Functions for mobile device input, touch controls, and Android-specific features.
mobileC:Bool
Returns whether the game is currently running on a mobile device.
mobileControlsMode():String
Returns the current mobile controls mode as a string.
extraButtonPressed(button:String = 'first'):Bool
Returns whether an extra mobile control button is currently being held.
extraButtonJustPressed(button:String = 'first'):Bool
Returns whether an extra mobile control button was just pressed in this frame.
extraButtonJustReleased(button:String = 'first'):Bool
Returns whether an extra mobile control button was just released in this frame.
extraButtonReleased(button:String = 'first'):Bool
Returns whether an extra mobile control button is not being pressed (released).
vibrate(duration:Int, ?period:Int = 0):Void
Makes the device vibrate for the specified duration.
addTouchPad(DPadMode:String, ActionMode:String, ?addToCustomSubstate:Bool = false, ?posAtCustomSubstate:Int = -1):Void
Adds a customizable touchpad to the screen.
removeTouchPad():Void
Removes the currently active touchpad.
addTouchPadCamera(?defaultDrawTarget:Bool = false):Void
Adds a camera specifically for the touchpad.
touchPadJustPressed(button:Dynamic):Bool
Returns whether a touchpad button was just pressed in this frame.
touchPadPressed(button:Dynamic):Bool
Returns whether a touchpad button is currently being held.
touchPadJustReleased(button:Dynamic):Bool
Returns whether a touchpad button was just released in this frame.
touchPadReleased(button:Dynamic):Bool
Returns whether a touchpad button is not being pressed (released).
touchJustPressed():Bool
Returns whether the screen was just touched in this frame.
touchPressed():Bool
Returns whether the screen is currently being touched.
touchJustReleased():Bool
Returns whether the screen touch was just released in this frame.
touchReleased():Bool
Returns whether the screen is not being touched (released).
touchPressedObject(object:String, ?camera:String):Bool
Returns whether a specific object is being touched.
touchJustPressedObject(object:String, ?camera:String):Bool
Returns whether a specific object was just touched in this frame.
touchJustReleasedObject(object:String, ?camera:String):Bool
Returns whether touch was just released from a specific object.
touchReleasedObject(object:String, ?camera:String):Bool
Returns whether a specific object is not being touched.
touchOverlapsObject(object:String, ?camera:String):Bool
Returns whether the current touch position overlaps with an object.
These functions are only available on Android devices.
isDolbyAtmos():Bool
Returns whether the device supports Dolby Atmos audio.
isAndroidTV():Bool
Returns whether the device is an Android TV.
isTablet():Bool
Returns whether the device is a tablet.
isChromebook():Bool
Returns whether the device is a Chromebook.
isDeXMode():Bool
Returns whether Samsung DeX mode is active.
backJustPressed():Bool
Returns whether the Android back button was just pressed.
backPressed():Bool
Returns whether the Android back button is being held.
backJustReleased():Bool
Returns whether the Android back button was just released.
menuJustPressed():Bool
Returns whether the Android menu button was just pressed.
menuPressed():Bool
Returns whether the Android menu button is being held.
menuJustReleased():Bool
Returns whether the Android menu button was just released.
getCurrentOrientation():String
Returns the current screen orientation as a string.
setOrientation(hint:String):Void
Sets the screen orientation.
minimizeWindow():Void
Minimizes the app window (sends to background).
showToast(text:String, duration:Int, ?xOffset:Int = 0, ?yOffset:Int = 0):Void
Shows an Android toast notification.
isScreenKeyboardShown():Bool
Returns whether the on-screen keyboard is currently visible.
clipboardHasText():Bool
Returns whether the clipboard contains text.
clipboardGetText():String
Returns the text currently in the clipboard.
clipboardSetText(text:String):Void
Sets text to the clipboard.
manualBackButton():Void
Manually triggers the back button action programmatically.
setActivityTitle(text:String):Void
Sets the Android activity/window title.