Constructor

new ()

Variables

onExit:Event<Int ‑> Void> = new Event<Int>()

Exit events are dispatched when the application is exiting

Methods

onGamepadAxisMove (gamepad:Gamepad, axis:GamepadAxis, value:Float):Void

Called when a gamepad axis move event is fired

Parameters:

gamepad

The current gamepad

axis

The axis that was moved

value

The axis value (between 0 and 1)

onGamepadButtonDown (gamepad:Gamepad, button:GamepadButton):Void

Called when a gamepad button down event is fired

Parameters:

gamepad

The current gamepad

button

The button that was pressed

onGamepadButtonUp (gamepad:Gamepad, button:GamepadButton):Void

Called when a gamepad button up event is fired

Parameters:

gamepad

The current gamepad

button

The button that was released

onGamepadConnect (gamepad:Gamepad):Void

Called when a gamepad is connected

Parameters:

gamepad

The gamepad that was connected

onGamepadDisconnect (gamepad:Gamepad):Void

Called when a gamepad is disconnected

Parameters:

gamepad

The gamepad that was disconnected

onJoystickAxisMove (joystick:Joystick, axis:Int, value:Float):Void

Called when a joystick axis move event is fired

Parameters:

joystick

The current joystick

axis

The axis that was moved

value

The axis value (between 0 and 1)

onJoystickButtonDown (joystick:Joystick, button:Int):Void

Called when a joystick button down event is fired

Parameters:

joystick

The current joystick

button

The button that was pressed

onJoystickButtonUp (joystick:Joystick, button:Int):Void

Called when a joystick button up event is fired

Parameters:

joystick

The current joystick

button

The button that was released

onJoystickConnect (joystick:Joystick):Void

Called when a joystick is connected

Parameters:

joystick

The joystick that was connected

onJoystickDisconnect (joystick:Joystick):Void

Called when a joystick is disconnected

Parameters:

joystick

The joystick that was disconnected

onJoystickHatMove (joystick:Joystick, hat:Int, position:JoystickHatPosition):Void

Called when a joystick hat move event is fired

Parameters:

joystick

The current joystick

hat

The hat that was moved

position

The current hat position

onJoystickTrackballMove (joystick:Joystick, trackball:Int, x:Float, y:Float):Void

Called when a joystick axis move event is fired

Parameters:

joystick

The current joystick

trackball

The trackball that was moved

x

The x movement of the trackball (between 0 and 1)

y

The y movement of the trackball (between 0 and 1)

onKeyDown (window:Window, keyCode:KeyCode, modifier:KeyModifier):Void

Called when a key down event is fired

Parameters:

window

The window dispatching the event

keyCode

The code of the key that was pressed

modifier

The modifier of the key that was pressed

onKeyUp (window:Window, keyCode:KeyCode, modifier:KeyModifier):Void

Called when a key up event is fired

Parameters:

window

The window dispatching the event

keyCode

The code of the key that was released

modifier

The modifier of the key that was released

onModuleExit (code:Int):Void

Called when the module is exiting

onMouseDown (window:Window, x:Float, y:Float, button:Int):Void

Called when a mouse down event is fired

Parameters:

window

The window dispatching the event

x

The current x coordinate of the mouse

y

The current y coordinate of the mouse

button

The ID of the mouse button that was pressed

onMouseMove (window:Window, x:Float, y:Float):Void

Called when a mouse move event is fired

Parameters:

window

The window dispatching the event

x

The current x coordinate of the mouse

y

The current y coordinate of the mouse

button

The ID of the mouse button that was pressed

onMouseMoveRelative (window:Window, x:Float, y:Float):Void

Called when a mouse move relative event is fired

Parameters:

window

The window dispatching the event

x

The x movement of the mouse

y

The y movement of the mouse

button

The ID of the mouse button that was pressed

onMouseUp (window:Window, x:Float, y:Float, button:Int):Void

Called when a mouse up event is fired

Parameters:

window

The window dispatching the event

x

The current x coordinate of the mouse

y

The current y coordinate of the mouse

button

The ID of the button that was released

onMouseWheel (window:Window, deltaX:Float, deltaY:Float):Void

Called when a mouse wheel event is fired

Parameters:

window

The window dispatching the event

deltaX

The amount of horizontal scrolling (if applicable)

deltaY

The amount of vertical scrolling (if applicable)

onPreloadComplete ():Void

Called when a preload complete event is fired

onPreloadProgress (loaded:Int, total:Int):Void

Called when a preload progress event is fired

Parameters:

loaded

The number of items that are loaded

total

The total number of items will be loaded

onRenderContextLost (renderer:Renderer):Void

Called when a render context is lost

Parameters:

renderer

The renderer dispatching the event

onRenderContextRestored (renderer:Renderer, context:RenderContext):Void

Called when a render context is restored

Parameters:

renderer

The renderer dispatching the event

context

The current render context

onTextEdit (window:Window, text:String, start:Int, length:Int):Void

Called when a text edit event is fired

Parameters:

window

The window dispatching the event

text

The current replacement text

start

The starting index for the edit

length

The length of the edit

onTextInput (window:Window, text:String):Void

Called when a text input event is fired

Parameters:

window

The window dispatching the event

text

The current input text

onTouchCancel (touch:Touch):Void

Called when a touch cancel event is fired

Parameters:

touch

The current touch object

onTouchEnd (touch:Touch):Void

Called when a touch end event is fired

Parameters:

touch

The current touch object

onTouchMove (touch:Touch):Void

Called when a touch move event is fired

Parameters:

touch

The current touch object

onTouchStart (touch:Touch):Void

Called when a touch start event is fired

Parameters:

touch

The current touch object

onWindowActivate (window:Window):Void

Called when a window activate event is fired

Parameters:

window

The window dispatching the event

onWindowClose (window:Window):Void

Called when a window close event is fired

Parameters:

window

The window dispatching the event

onWindowCreate (window:Window):Void

Called when a window create event is fired

Parameters:

window

The window dispatching the event

onWindowDeactivate (window:Window):Void

Called when a window deactivate event is fired

Parameters:

window

The window dispatching the event

onWindowDropFile (window:Window, file:String):Void

Called when a window drop file event is fired

Parameters:

window

The window dispatching the event

onWindowEnter (window:Window):Void

Called when a window enter event is fired

Parameters:

window

The window dispatching the event

onWindowFocusIn (window:Window):Void

Called when a window focus in event is fired

Parameters:

window

The window dispatching the event

onWindowFocusOut (window:Window):Void

Called when a window focus out event is fired

Parameters:

window

The window dispatching the event

onWindowFullscreen (window:Window):Void

Called when a window enters fullscreen

Parameters:

window

The window dispatching the event

onWindowLeave (window:Window):Void

Called when a window leave event is fired

Parameters:

window

The window dispatching the event

onWindowMinimize (window:Window):Void

Called when a window is minimized

Parameters:

window

The window dispatching the event

onWindowMove (window:Window, x:Float, y:Float):Void

Called when a window move event is fired

Parameters:

window

The window dispatching the event

x

The x position of the window in desktop coordinates

y

The y position of the window in desktop coordinates

onWindowResize (window:Window, width:Int, height:Int):Void

Called when a window resize event is fired

Parameters:

window

The window dispatching the event

width

The width of the window

height

The height of the window

onWindowRestore (window:Window):Void

Called when a window is restored from being minimized or fullscreen

Parameters:

window

The window dispatching the event

render (renderer:Renderer):Void

Called when a render event is fired

Parameters:

renderer

The renderer dispatching the event

update (deltaTime:Int):Void

Called when an update event is fired

Parameters:

deltaTime

The amount of time in milliseconds that has elapsed since the last update