Top Fields Constructors Methods
com.badlogic.gdx.controllers.desktop.support

public Class CompositeControllerListener

extends Object
implements ControllerListener
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.controllers.ControllerListener
Imports
com.badlogic.gdx.controllers.Controller, .ControllerListener, java.util.LinkedList

Field Summary

Modifier and TypeField and Description
private final LinkedList<ControllerListener>

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

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

An axis on the Controller moved.

public boolean
buttonDown(final Controller controller, final int buttonCode)

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

A button on the Controller was pressed.

public boolean
buttonUp(final Controller controller, final int buttonCode)

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

A button on the Controller was released.

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

Field Detail

listenersback to summary
private final LinkedList<ControllerListener> listeners

Constructor Detail

CompositeControllerListenerback to summary
public CompositeControllerListener()

Method Detail

addListenerback to summary
public void addListener(ControllerListener listener)
axisMovedback to summary
public boolean axisMoved(final Controller controller, final int axisCode, final 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(final Controller controller, final int buttonCode)

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(final Controller controller, final int buttonCode)

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
clearback to summary
public void clear()
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
removeListenerback to summary
public void removeListener(ControllerListener listener)