on.resize

From Inspired-Lua Wiki
Revision as of 14:02, 6 July 2011 by Adriweb (talk | contribs)
Jump to navigation Jump to search

The event on.resize is fired when the user resizes the window where the lua script is.

It has no argument.


Example

Below is an example of a program that draws a line on the screen when the user resizes the window :

function on.resize() --Define a function for the event
       gc:drawLine(5,5,200,1) --Draw a line on the screen
end