GetScreenSize (Harvest)
From OxeyeWiki
(Difference between revisions)
(One intermediate revision not shown) | |||
Line 4: | Line 4: | ||
| | | | ||
Returns the game's resolution. | Returns the game's resolution. | ||
+ | | | ||
| | | | ||
Returns two values, width and height. Both are of the type Number. | Returns two values, width and height. Both are of the type Number. | ||
Line 12: | Line 13: | ||
harvest.drawRectangle(0, 0, w, h, 0, 0, 0, 255) | harvest.drawRectangle(0, 0, w, h, 0, 0, 0, 255) | ||
</pre> | </pre> | ||
+ | |||
+ | === Resources === | ||
+ | *[http://www.oxeyegames.com/forum/viewtopic.php?p=1523#p1523 Oxeye Game Studio Forum - Harvest Functions] |
Latest revision as of 16:15, 2 December 2009
width, height = getScreenSize() | ||
Returns the game's resolution. | ||
Parameter | Expected Type | Description |
Returns | ||
Returns two values, width and height. Both are of the type Number. |
Example
local w,h = harvest.getScreenSize() harvest.drawRectangle(0, 0, w, h, 0, 0, 0, 255)