Skip to main content

ScreenFunctions

Index

Properties

Click

Called if the user clicks on the canvas

@param

The event that triggered this

optionalDraw

Called each frame when the screen needs to be drawn.

optionalExit

Called when user presses Esc

optionalKeyDown

Called if the the user presses any key

@param

The event that triggered this

optionalKeyUp

Called if the user releases a pressed key

@param

The event that triggered this

optionalLoad

Called when screen is loaded using CommonSetScreen

optionalMouseDown

MouseDown?: MouseEventListener

Called if the user presses the mouse button or touches the touchscreen on the canvas

@param

The event that triggered this

optionalMouseMove

MouseMove?: MouseEventListener

Called if the user moves the mouse cursor or the touch on the touchscreen over the canvas

@param

The event that triggered this

optionalMouseUp

Called if the user releases the mouse button or the touchscreen on the canvas

@param

The event that triggered this

optionalMouseWheel

Called if the user moves the mouse wheel on the canvas

@param

The event that triggered this

optionalResize

Called when screen size or position changes or after screen load

@param

If the reason for call was load (true) or window resize (false)

Run

Called each frame

@param

The current time for frame

optionalUnload

Unload?: VoidHandler

Called when this screen is being replaced