A Gamepad controller class

Constructor

new (?options:GamepadOptions)

Creates a new Gamepad controller with given options

 *  @param options	GamepadOptions - {
 *  	id:Int								Gamepad ID,
 *  	connect_timer:Float					how often to try to connect,
 *  	binding:Map<ControllerButton, FlxGamepadInputID>	gamepad bindings,
 *  	on_connect:Void -> Void				on connect callback
 *  	on_disconnect:Void -> Void			on disconnect callback,
 *  }

Inherited Variables

Defined by Controller

@:value(false)protected:Bool = false

@:value(new Map())state:Map<ControllerButton, Bool> = new Map()

The current state of the controller

Inherited Methods

Defined by Controller

@:dox(show)add ():Void

inlineget_history ():Array<Map<ControllerButton, Bool>>

Returns a history of states for the controller

 *  @return	Array<Map<ControllerButton, Bool>>

inlinejust_pressed (button:ControllerButton):Bool

Gets the just pressed state of a button

 *  @param button	button query
 *  @return			Bool

inlinejust_released (button:ControllerButton):Bool

Gets the just released state of a button

 *  @param button	button query
 *  @return			Bool

inlinepressed (button:ControllerButton):Bool

Gets the pressed state of a button

 *  @param button	button query
 *  @return			Bool

private@:dox(show)set (dt:Float):Void

inlineset_button (button:ControllerButton, pressed:Bool):Void

Set button state

 *  @param button	button to set
 *  @param pressed	whether it's pressed or not

inlineset_max_history (length:Int):Void

Set the maximum number of history states

 *  @param length	length of max history states