Difference between revisions of "on.resize"

From Inspired-Lua Wiki
Jump to navigation Jump to search
(Created page with "Category:Events")
 
Line 1: Line 1:
 +
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 :
 +
<source lang="lua">
 +
function on.resize() --Define a function for the event
 +
      gc:drawLine(5,5,200,1) --Draw a line on the screen
 +
end
 +
</source>
 +
 
[[Category:Events]]
 
[[Category:Events]]

Revision as of 14:02, 6 July 2011

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