Changes

Jump to navigation Jump to search

Changes in OS 3.2

51 bytes added, 13:42, 5 June 2012
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==

Navigation menu