Top Description Methods
com.badlogic.gdx.controllers

public Interface ControllerListener

Known Direct Implementers
com.badlogic.gdx.controllers.ControllerAdapter

Registered with Controllers or a specific Controller instance to receive events.
Author
Nathan Sweet

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether to hand the event to other listeners.
axisMoved
(Controller controller, int axisCode, float
the axis value, -1 to 1
value
)

An axis on the Controller moved.

public boolean

Returns:

whether to hand the event to other listeners.
buttonDown
(Controller controller, int buttonCode)

A button on the Controller was pressed.

public boolean

Returns:

whether to hand the event to other listeners.
buttonUp
(Controller controller, int buttonCode)

A button on the Controller was released.

public void
connected(Controller controller)

A Controller got connected.

public void
disconnected(Controller controller)

A Controller got disconnected.

Method Detail

axisMovedback to summary
public boolean axisMoved(Controller controller, int axisCode, float value)

An axis on the Controller moved. The axisCode is controller specific. The axis value is in the range [-1, 1]. The com.badlogic.gdx.controllers.mapping package hosts axes constants for known controllers.

Parameters
value:float

the axis value, -1 to 1

Returns:boolean

whether to hand the event to other listeners.

buttonDownback to summary
public boolean buttonDown(Controller controller, int buttonCode)

A button on the Controller was pressed. The buttonCode is controller specific. The com.badlogic.gdx.controllers.mapping package hosts button constants for known controllers.

Returns:boolean

whether to hand the event to other listeners.

buttonUpback to summary
public boolean buttonUp(Controller controller, int buttonCode)

A button on the Controller was released. The buttonCode is controller specific. The com.badlogic.gdx.controllers.mapping package hosts button constants for known controllers.

Returns:boolean

whether to hand the event to other listeners.

connectedback to summary
public void connected(Controller controller)

A Controller got connected.

disconnectedback to summary
public void disconnected(Controller controller)

A Controller got disconnected.