natiny.window.get_width
natiny.window.get_width(win)
Returns the current width of a window in drawing units.
Parameters
| Name | Type | Description |
|---|---|---|
win |
number |
Window handle from natiny.window.create |
Returns
| Type | Description |
|---|---|
number |
Window width, 0 if the window does not exist |
Example
local win = natiny.window.create("My Game", 1280, 720)
local w = natiny.window.get_width(win)
print("Width: " .. w)