Functions and constants to access the window, window event listeners and screen dimming.
Static methods
staticget_dim_mode():WindowDimmingMode
Returns the current dimming mode set on a mobile device.
The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction.
On platforms that does not support dimming, DIMMING_UNKNOWN
is always returned.
Returns:
The mode for screen dimming
staticget_size():WindowSize
This returns the current window size (width and height).
Returns:
The size of the window.
staticset_dim_mode(mode:WindowDimmingMode):Void
Sets the dimming mode on a mobile device.
The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. The dimming mode will only affect the mobile device while the game is in focus on the device, but not when the game is running in the background.
This function has no effect on platforms that does not support dimming.
Parameters:
mode | The mode for screen dimming |
---|
staticset_listener<T>(callback:(T, WindowEvent, WindowEventData) ‑> Void):Void
Sets a window event listener.
Parameters:
callback | A callback which receives info about window events. Can be null. |
---|