Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Changes in OS 3.2
51 bytes added
,
13:42, 5 June 2012
→Graphical operations
Line 24:
Line 24:
return gc:getStringWidth(str)
return gc:getStringWidth(str)
end
end
−
function on.construction()
+
function on.construction()
-- was on.create before
−
local strw = platform.withGC(getStringWidth, "The game")
+
local strw = platform.withGC(getStringWidth, "The game")
-- was platform.gc() before
end</syntaxhighlight>
end</syntaxhighlight>
−
So what it does it call the function you give as first argument and pass a dummy [[gc|GC]] (Graphics Context) to it.
+
So what it does it call the function you give as first argument and pass a dummy [[gc|GC]] (Graphics Context) to it.
==D2Editor==
==D2Editor==
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