public interface Gamepad
Modifier and Type | Interface and Description |
---|---|
static class |
Gamepad.KeyType
The type of a general controller button
|
Modifier and Type | Method and Description |
---|---|
void |
connectGamepad()
Connect the virtual gamepad to the server.
|
void |
disconnectGamepad()
Disconnect the virtual gamepad from the server.
|
void |
onGamepadKey(int keycode,
boolean down)
Send a gamepad button event.
|
void |
onGamepadStick(Gamepad.KeyType type,
int x,
int y)
Send a gamepad stick event.
|
void |
onGamepadTrigger(Gamepad.KeyType type,
int value,
boolean down)
Send a gamepad trigger event.
|
void connectGamepad()
void disconnectGamepad()
void onGamepadKey(int keycode, boolean down)
keycode
- The keycode, such as `RT`, `RB`, `L3`, and `R3`.down
- true if the button is pressed, false if the button is released.void onGamepadStick(Gamepad.KeyType type, int x, int y)
type
- The stick type. See Gamepad.KeyType.LS
, Gamepad.KeyType.RS
.x
- The X coordinate of the sticky
- The Y coordinate of the stickvoid onGamepadTrigger(Gamepad.KeyType type, int value, boolean down)
type
- The trigger type. See Gamepad.KeyType.LT
, Gamepad.KeyType.RT
.value
- The absolute position of the trigger control. The value is normalized to a
range from 0 (released) to 255 (fully pressed).down
- true if the trigger is pressed, false if the trigger is released.