public abstract class PS3Controller extends java.lang.Object implements MdxController<PS3ControllerListener>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID_FULL |
static java.lang.String |
ID_PREFIX |
static java.lang.String |
ID_SUFFIX |
Constructor and Description |
---|
PS3Controller(com.badlogic.gdx.controllers.Controller controller) |
PS3Controller(com.badlogic.gdx.controllers.Controller controller,
DeadZone leftStickDeadZone,
DeadZone rightStickDeadZone) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(int index,
PS3ControllerListener listener)
Inserts a listener at the specified index to the controller
|
void |
addListener(PS3ControllerListener listener)
Adds a listener to the controller
|
void |
clearListeners()
Removes all listeners from this controller
|
ControllerType |
getControllerType()
Returns the
ControllerType for this controller |
DeadZone |
getLeftStickDeadZone() |
PS3ControllerListener |
getListener(int index)
Gets the listener at the specified index for this controller
|
DeadZone |
getRightStickDeadZone() |
int |
getTotalListeners()
Returns the total number of listeners for this controller
|
protected boolean |
notifyButtonDown(PS3Button button) |
protected boolean |
notifyButtonUp(PS3Button button) |
protected boolean |
notifyDisconnected() |
protected boolean |
notifyLeftStickXMoved(float value) |
protected boolean |
notifyLeftStickYMoved(float value) |
protected boolean |
notifyRightStickXMoved(float value) |
protected boolean |
notifyRightStickYMoved(float value) |
void |
removeListener(int index)
Removes a listener at the specified index from this controller
|
void |
removeListener(PS3ControllerListener listener)
Removes a listener from this controller
|
void |
setLeftStickDeadZone(DeadZone leftStickDeadZone) |
void |
setRightStickDeadZone(DeadZone rightStickDeadZone) |
public static final java.lang.String ID_FULL
public static final java.lang.String ID_PREFIX
public static final java.lang.String ID_SUFFIX
public PS3Controller(com.badlogic.gdx.controllers.Controller controller)
protected boolean notifyDisconnected()
protected boolean notifyButtonDown(PS3Button button)
protected boolean notifyButtonUp(PS3Button button)
protected boolean notifyLeftStickXMoved(float value)
protected boolean notifyLeftStickYMoved(float value)
protected boolean notifyRightStickXMoved(float value)
protected boolean notifyRightStickYMoved(float value)
public void addListener(int index, PS3ControllerListener listener)
MdxController
addListener
in interface MdxController<PS3ControllerListener>
index
- The index to insert the listener atlistener
- The listener to insertpublic void addListener(PS3ControllerListener listener)
MdxController
addListener
in interface MdxController<PS3ControllerListener>
listener
- The listener to addpublic void removeListener(int index)
MdxController
removeListener
in interface MdxController<PS3ControllerListener>
index
- The index to removepublic void removeListener(PS3ControllerListener listener)
MdxController
removeListener
in interface MdxController<PS3ControllerListener>
listener
- The listener to removepublic void clearListeners()
MdxController
clearListeners
in interface MdxController<PS3ControllerListener>
public PS3ControllerListener getListener(int index)
MdxController
getListener
in interface MdxController<PS3ControllerListener>
index
- The index to returnpublic int getTotalListeners()
MdxController
getTotalListeners
in interface MdxController<PS3ControllerListener>
public ControllerType getControllerType()
MdxController
ControllerType
for this controllergetControllerType
in interface MdxController<PS3ControllerListener>
ControllerType.UNKNOWN
if the controller is unknownpublic DeadZone getLeftStickDeadZone()
public void setLeftStickDeadZone(DeadZone leftStickDeadZone)
public DeadZone getRightStickDeadZone()
public void setRightStickDeadZone(DeadZone rightStickDeadZone)