Difference between revisions of "Lua:getScreenWidth"
Jump to navigation
Jump to search
(Created page with "<p> <b>getScreenWidth()</b>: Returns the screen width </p> <pre> print(getScreenWidth()) </pre>") |
|||
| Line 1: | Line 1: | ||
| − | + | [[Category:Lua]] | |
| − | + | {{CodeBox|'''function''' getScreenWidth() ''':''' integer}} | |
| − | + | ||
| + | Returns the screen width. | ||
| + | |||
| + | ===Function Parameters=== | ||
| + | This function has no parameters. | ||
| + | |||
| + | ===Returns=== | ||
| + | integer — The width of the screen in pixels. | ||
| + | |||
| + | ===Examples=== | ||
| + | |||
<pre> | <pre> | ||
| − | + | local width = getScreenWidth() | |
| + | print("Screen width: " .. width) | ||
</pre> | </pre> | ||
| + | |||
| + | {{LuaSeeAlso}} | ||
Latest revision as of 03:44, 21 June 2026
Returns the screen width.
Function Parameters[edit]
This function has no parameters.
Returns[edit]
integer — The width of the screen in pixels.
Examples[edit]
local width = getScreenWidth()
print("Screen width: " .. width)