Changes

Jump to navigation Jump to search

platform.window:width

248 bytes added, 23:12, 3 September 2011
no edit summary
Line 8: Line 8:     
== Example  ==
 
== Example  ==
<syntaxhighlight>ww = platform.window:width()</syntaxhighlight>
+
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 event
 +
    theWidth = platform.window:width()
 +
    theHeight = platform.window:height()
 +
end
 +
</source>
   −
<br /><br />
+
<br />
    
[[Category:platform.window]]
 
[[Category:platform.window]]

Navigation menu