Handles setting up and managing input controls for the game.

Static variables

staticread onlyhasExternalInputDevice:Bool

Returns wether there's a gamepad or keyboard devices connected and active.

@:value(true)staticread onlylastInputTouch:Bool = true

Returns wether the last input was sent through touch.

staticread onlyusingExternalInputDevice:Bool

Returns wether an external input device is currently used as the main input.

Static methods

staticaddButton(action:FlxActionDigital, button:FunkinButton, state:FlxInputState, cachedInput:Array<FlxActionInput>):Void

Adds a button input to a given FlxActionDigital and caches it.

Parameters:

action

The FlxActionDigital to add the button input to.

button

The FunkinButton associated with the action.

state

The input state to associate with the action.

cachedInput

The array of FlxActionInput objects to cache the input.

staticinitInputTrackers():Void

Initialize input trackers used to get the current status of the lastInputTouch field.

staticremoveCachedInput(controls:Controls, cachedInput:Array<FlxActionInput>):Void

Removes cached input associated with game controls.

Parameters:

controls

The Controls instance defining game controls.

cachedInput

The array of action input objects to clear cached input from.

@:access(funkin.input.Controls)staticsetupHitbox(controls:Controls, hitbox:FunkinHitbox, cachedInput:Array<FlxActionInput>):Void

Sets up hitbox controls based on game controls and hitbox hints.

Parameters:

controls

The controls instance defining game controls.

hitbox

The hitbox to associate with the controls.

cachedInput

The array of action input objects to cache the input.