Jump to: navigation, search


18 bytes added, 23:12, 3 September 2011
Below is an example of a program that creates/updates the "theHeight" ad "theWidth" global variables whenever the user resizes the widget's frame:
<source lang="lua">
function on.resize() --Define a function for the eventevents
theWidth = platform.window:width()
theHeight = platform.window:height()
You can then refer to the height and the width of the widget by calling the global variables instead of the [[:Category:platform.window|platform.window]] methods.

Navigation menu