Changes

Jump to: navigation, search

on.resize

317 bytes added, 21:09, 3 September 2011
It has no argument.
It's a good place to put your global window-size-related variable since this event only fires when the script's frame's size changes (see Example).
== Example ==
<source lang="lua">
function on.resize() --Define a function for the event
gc:drawLine theWidth = platform.window.width() theHeight = platform.window.height(5,5,200,1) --Draw a line on the screen
end
</source>
 
You can then refer to the height and the width of the widget by calling the global variables instead of the [[Catrgory:platform.window]] methods.
[[Category:Events]]