Constructor
Inherited Variables
Defined by Application
The current frame rate (measured in frames-per-second) of the application.
On some platforms, a frame rate of 60 or greater may imply vsync, which will perform more quickly on displays with a higher refresh rate
onUpdate:Event<Int ‑> Void> = new Event<Int>()
Update events are dispatched each frame (usually just before rendering)
The Renderer associated with this Application, or the first Renderer if there are multiple Renderer instances
Defined by Module
Inherited Methods
Defined by Application
addRenderer (renderer:Renderer):Void
Adds a new Renderer to the Application. By default, this is called automatically by create()
Parameters:
renderer | A Renderer object to add |
---|
Initializes the Application, using the settings defined in the config instance. By default, this is called automatically when building the project using Lime's command-line tools
Parameters:
config | A Config object |
---|
createWindow (window:Window):Void
Adds a new Window to the Application. By default, this is called automatically by create()
Parameters:
window | A Window object to add |
---|
Execute the Application. On native platforms, this method blocks until the application is finished running. On other platforms, it will return immediately
Returns:
An exit code, 0 if there was no error
removeModule (module:IModule):Void
Removes a module from the Application
Parameters:
module | A module to remove |
---|
Defined by Module
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 |
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) |
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 |
---|
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 |
---|