function OnSize() ... end function
This is an event function you can overload to perform some actions when a window is resized. This event is fired when either a window is resized or mobile device is rotated. You can use GetWidth and GetHeight to retrieve the new width and height of the window. Example:
$Pony = #"pony.png" function OnSize() ClearScreen() DrawImageRectangle(1, 1, GetWidth(), GetHeight(), $Pony) end function DrawImageRectangle(1, 1, GetWidth(), GetHeight(), $Pony)
See also: