Line 4: |
Line 4: |
| | | |
| Here are the changes made. | | Here are the changes made. |
− |
| |
− | * [[platform.apiLevel]] is now '2.0'. You can manually set it to '1.0' again in order to have some retro-compatibility.
| |
− | * [[platform.gc]] has been deleted.
| |
− | * [[on.construction]] replaces [[on.create]]
| |
− | * [[D2Editor|D2Editor]] improved.
| |
− | * [[Physics Engine]]
| |
− |
| |
− |
| |
− | (todo)
| |
| | | |
| ==Compatibility mode== | | ==Compatibility mode== |
Line 20: |
Line 11: |
| :''platform.apiLevel = '1.0''' | | :''platform.apiLevel = '1.0''' |
| <br /> | | <br /> |
− | or :<br />
| + | or : |
| :''platform.apiLevel = '2.0''' | | :''platform.apiLevel = '2.0''' |
| <br /> | | <br /> |
Line 26: |
Line 17: |
| | | |
| ==on.create== | | ==on.create== |
− | <tt>on.create</tt> is removed in apiLevel 2.0 and replaced with <tt>on.construction</tt>.<br />
| + | [[on.create]] is removed in apiLevel 2.0 and replaced with [[on.construction]].<br /> |
| This event handler is guaranteed to run before all others.<br /> | | This event handler is guaranteed to run before all others.<br /> |
| | | |
| ==Graphical operations== | | ==Graphical operations== |
| * Most graphical operations are now anti-aliased. This makes that applications look more pretty | | * Most graphical operations are now anti-aliased. This makes that applications look more pretty |
− | * gc:setColorRGB now supports one number as input (as well as the old style). For example, you can do <tt>gc:setColorRGB(0xFF00CC)</tt> or <tt>gc:setColorRGB(0)</tt> | + | * gc:setColorRGB now supports one number as input (as well as the old style). For example, you can do [[gc:setColorRGB(0xFF00CC)]] or [[gc:setColorRGB(0)]] |
| * You can not use coordinates for drawing to the screen above/under (-) 32 000. Normally this shouldn't affect anyone, but because of this Cubefield refuses to run. | | * You can not use coordinates for drawing to the screen above/under (-) 32 000. Normally this shouldn't affect anyone, but because of this Cubefield refuses to run. |
− | * In apiLevel 2.0, <tt>platform.gc()</tt> is removed and replaced with <tt>platform.withGC()</tt>. An example of it:<br /> | + | * In apiLevel 2.0, [[platform.gc()]] is removed and replaced with [[platform.withGC()]]. An example of it:<br /> |
| [code]function getStringWidth(gc, str) | | [code]function getStringWidth(gc, str) |
| return gc:getStringWidth(str) | | return gc:getStringWidth(str) |
Line 50: |
Line 41: |
| 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 /> |
| We don't know what strict is or does. <br /> | | We don't know what strict is or does. <br /> |
− | Usage: <tt>require 'modulename'</tt><br /> | + | Usage: [[require 'modulename']]<br /> |
| | | |
| ==Physics== | | ==Physics== |
Line 56: |
Line 47: |
| | | |
| ==Image== | | ==Image== |
− | <tt>image.rotate</tt>. This allows you to rotate images in anyway.<br />
| + | [[image.rotate]]. This allows you to rotate images in anyway.<br /> |
| | | |
| ==Math== | | ==Math== |
− | New : <tt>math.evalStr</tt>, <tt>math.getEvalSettings</tt> and <tt>math.setEvalSettings</tt>.<br /> | + | New : [[math.evalStr]], [[math.getEvalSettings]] and [[math.setEvalSettings]].<br /> |
| | | |
| ==Platform== | | ==Platform== |
− | I already mentioned <tt>platform.withGC</tt>, but there are still two other newcomers:<br /> | + | I already mentioned [[platform.withGC]], but there are still two other newcomers:<br /> |
− | * <tt>platform.registerErrorHandler</tt>, this allows you to take actions when an error occurs in your document. | + | * [[platform.registerErrorHandler]], this allows you to take actions when an error occurs in your document. |
− | * <tt>platform.window:setFocus</tt>, regain focus in your script.<br /> | + | * [[platform.window:setFocus]], regain focus in your script.<br /> |
| | | |
| ==Variable== | | ==Variable== |
− | * <tt>var.recallAt</tt>, fetch data from a certain spot in a list or matrix<br /> | + | * [[var.recallAt]], fetch data from a certain spot in a list or matrix<br /> |
− | * <tt>var.makeNumericList</tt>, create a list in the symbol table. The create list will work much more efficient with other var functions. | + | * [[var.makeNumericList]], create a list in the symbol table. The create list will work much more efficient with other var functions. |