Changes

Jump to navigation Jump to search

Changes in OS 3.2

184 bytes added, 19:31, 6 June 2012
no edit summary
Line 11: Line 11:  
==Events==
 
==Events==
 
* [[on.create]] is removed in apilevel 2.0 and replaced with [[on.construction]]. This event handler is guaranteed to run before all others.<br />
 
* [[on.create]] is removed in apilevel 2.0 and replaced with [[on.construction]]. This event handler is guaranteed to run before all others.<br />
* [[on.getFocus]] is called when the script receives user input focus.
+
* New : [[on.getFocus]] is called when the script receives user input focus.
* [[on.loseFocus]] is called when the script loses user input focus.
+
* New : [[on.loseFocus]] is called when the script loses user input focus.
* [[on.getSymbolList]] is called when the script app symbol list is being serialized to the clipboard.  
+
* New : [[on.getSymbolList]] is called when the script app symbol list is being serialized to the clipboard.  
    
==Graphical operations==  
 
==Graphical operations==  
Line 53: Line 53:  
The physics module is the chipmunk physics engine.<br />  
 
The physics module is the chipmunk physics engine.<br />  
 
color is just a table containing colors. (color.red (or color["red"]) will return the color code for red.)<br />
 
color is just a table containing colors. (color.red (or color["red"]) will return the color code for red.)<br />
'strict' is a module (not tested) which apparently, makes it so Lua checks uses of undeclared global variables. All global variables must be 'declared' through a regular assignment (even assigning nil will do) in a main chunk before being used anywhere or assigned to inside a function.<br />
+
'strict' is a module (not tested) which, apparently, makes it so Lua checks uses of undeclared global variables. All global variables must be 'declared' through a regular assignment (even assigning nil will do) in a main chunk before being used anywhere or assigned to inside a function.<br />
 
Usage: [[require]] 'modulename'<br />
 
Usage: [[require]] 'modulename'<br />
    
==Physics==
 
==Physics==
Maybe the best part of it of. OS 3.2 now includes the Open Source Chipmunk [[Physics_Engine|Physics engine]], and you can use it right from Lua!<br /> This will allow some great games and applications <br /> Tutorials about it coming soon.<br />
+
Maybe the best part of it : OS 3.2 now includes the Open Source Chipmunk [[Physics_Engine|Physics engine]], and you can use it right from Lua!<br /> This will allow some great games and applications <br /> Find all the functions/categories [[Category:Physics_Engine|here]].Tutorials about it coming soon.<br />
    
==Image==
 
==Image==
[[image.rotate]]. Performs images rotation.<br />
+
[[image.rotate]]. Performs images rotation. (Warning : The image changes size when you rotate it. So you need to figure where to draw it based on the middle of its rotated size.)
    
==Math==
 
==Math==
 
+
* [[math.eval]] was revised to remove the optional argument exact and use current document settings, approximate mode, and full precision  
*[[math.eval]] was revised to remove the optional argument exact and use current document settings, approximate mode, and full precision in platform.apilevel = '2.0'
   
* New : [[math.evalStr]], [[math.getEvalSettings]] and  [[math.setEvalSettings]].<br />
 
* New : [[math.evalStr]], [[math.getEvalSettings]] and  [[math.setEvalSettings]].<br />
  

Navigation menu