Changes
Jump to navigation
Jump to search
← Older edit
image.new
308 bytes added
,
18:31, 28 March 2014
→Example
Line 31:
Line 31:
-- For ApiLevel >= 2.3 (OS >= 3.6) :
-- For ApiLevel >= 2.3 (OS >= 3.6) :
−
img = image.new(_R.IMG.img_1)</syntaxhighlight>
+
img = image.new(_R.IMG.img_1
)
+
+
-- Example from Jim Bauwens:
+
-- Of course if you have many images you just could use a for loop to do that for every image :
+
myImages = {}
+
for img_name, img_resource in pairs(_R.IMG) do
+
myImages[img_name] = image.new(img_resource)
+
end
+
-- that way you could do
+
gc:drawImage(myImages.img_1, 10, 10
)</syntaxhighlight>
== See also ==
== See also ==
Adriweb
Bureaucrats
,
Administrators
935
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version