Top Description Constructors Methods
com.badlogic.gdx.controllers

public Class ControllerAdapter

extends Object
implements ControllerListener
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.controllers.ControllerListener
Known Direct Subclasses
com.badlogic.gdx.controllers.AbstractControllerManager.ManageCurrentControllerListener

A base implementation for ControllerListener. Subclass this if you are only interested in a few specific events.
Author
mzechner

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
axisMoved(Controller controller, int axisIndex, float
the axis value, -1 to 1
value
)

Implements com.badlogic.gdx.controllers.ControllerListener.axisMoved.

An axis on the Controller moved.

public boolean
buttonDown(Controller controller, int buttonIndex)

Implements com.badlogic.gdx.controllers.ControllerListener.buttonDown.

A button on the Controller was pressed.

public boolean
buttonUp(Controller controller, int buttonIndex)

Implements com.badlogic.gdx.controllers.ControllerListener.buttonUp.

A button on the Controller was released.

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ControllerAdapterback to summary
public ControllerAdapter()

Method Detail

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

Implements com.badlogic.gdx.controllers.ControllerListener.axisMoved.

Doc from com.badlogic.gdx.controllers.ControllerListener.axisMoved.

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.

Annotations
@Override
buttonDownback to summary
public boolean buttonDown(Controller controller, int buttonIndex)

Implements com.badlogic.gdx.controllers.ControllerListener.buttonDown.

Doc from com.badlogic.gdx.controllers.ControllerListener.buttonDown.

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.

Annotations
@Override
buttonUpback to summary
public boolean buttonUp(Controller controller, int buttonIndex)

Implements com.badlogic.gdx.controllers.ControllerListener.buttonUp.

Doc from com.badlogic.gdx.controllers.ControllerListener.buttonUp.

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.

Annotations
@Override
connectedback to summary
public void connected(Controller controller)

Implements com.badlogic.gdx.controllers.ControllerListener.connected.

Doc from com.badlogic.gdx.controllers.ControllerListener.connected.

A Controller got connected.

Annotations
@Override
disconnectedback to summary
public void disconnected(Controller controller)

Implements com.badlogic.gdx.controllers.ControllerListener.disconnected.

Doc from com.badlogic.gdx.controllers.ControllerListener.disconnected.

A Controller got disconnected.

Annotations
@Override