public abstract class XboxOneController extends java.lang.Object implements MdxController<XboxOneControllerListener>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
Constructor and Description |
---|
XboxOneController(com.badlogic.gdx.controllers.Controller controller) |
XboxOneController(com.badlogic.gdx.controllers.Controller controller,
DeadZone leftStickDeadZone,
DeadZone rightStickDeadZone) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(int index,
XboxOneControllerListener listener)
Inserts a listener at the specified index to the controller
|
void |
addListener(XboxOneControllerListener 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() |
XboxOneControllerListener |
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(XboxOneButton button) |
protected boolean |
notifyButtonUp(XboxOneButton button) |
protected boolean |
notifyDisconnected() |
protected boolean |
notifyLeftStickXMoved(float value) |
protected boolean |
notifyLeftStickYMoved(float value) |
protected boolean |
notifyLeftTriggerMoved(float value) |
protected boolean |
notifyRightStickXMoved(float value) |
protected boolean |
notifyRightStickYMoved(float value) |
protected boolean |
notifyRightTriggerMoved(float value) |
void |
removeListener(int index)
Removes a listener at the specified index from this controller
|
void |
removeListener(XboxOneControllerListener listener)
Removes a listener from this controller
|
void |
setLeftStickDeadZone(DeadZone leftStickDeadZone) |
void |
setRightStickDeadZone(DeadZone rightStickDeadZone) |
public static final java.lang.String ID
public XboxOneController(com.badlogic.gdx.controllers.Controller controller)
protected boolean notifyDisconnected()
protected boolean notifyButtonDown(XboxOneButton button)
protected boolean notifyButtonUp(XboxOneButton button)
protected boolean notifyLeftTriggerMoved(float value)
protected boolean notifyRightTriggerMoved(float value)
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, XboxOneControllerListener listener)
MdxController
addListener
in interface MdxController<XboxOneControllerListener>
index
- The index to insert the listener atlistener
- The listener to insertpublic void addListener(XboxOneControllerListener listener)
MdxController
addListener
in interface MdxController<XboxOneControllerListener>
listener
- The listener to addpublic void removeListener(int index)
MdxController
removeListener
in interface MdxController<XboxOneControllerListener>
index
- The index to removepublic void removeListener(XboxOneControllerListener listener)
MdxController
removeListener
in interface MdxController<XboxOneControllerListener>
listener
- The listener to removepublic void clearListeners()
MdxController
clearListeners
in interface MdxController<XboxOneControllerListener>
public XboxOneControllerListener getListener(int index)
MdxController
getListener
in interface MdxController<XboxOneControllerListener>
index
- The index to returnpublic int getTotalListeners()
MdxController
getTotalListeners
in interface MdxController<XboxOneControllerListener>
public ControllerType getControllerType()
MdxController
ControllerType
for this controllergetControllerType
in interface MdxController<XboxOneControllerListener>
ControllerType.UNKNOWN
if the controller is unknownpublic DeadZone getLeftStickDeadZone()
public void setLeftStickDeadZone(DeadZone leftStickDeadZone)
public DeadZone getRightStickDeadZone()
public void setRightStickDeadZone(DeadZone rightStickDeadZone)