mojo.input.Joystick - nitrologic/monkey2 GitHub Wiki
mojo::mojo.input.Joystick
Class Joystick
The Joystick class.
Properties |
|
Attached |
True if joystick is currently attached. (read only) |
GUID |
Joystick GUID. (read only) |
Name |
Joystick device name. (read only) |
NumAxes |
The number of axes supported by the joystick. (read only) |
NumBalls |
The number of balls upported by the joystick. (read only) |
NumButtons |
The number of buttons supported by the joystick. (read only) |
NumHats |
The number of hats supported by the joystick. (read only) |
Methods |
|
ButtonDown |
Gets button up/down state. |
ButtonPressed |
Checks if a button has been pressed. |
Close |
Closes the joystick. |
GetAxis |
Gets joystick axis value and returns a result in the range -1 to 1. |
GetBall |
Gets joystick ball value. |
GetHat |
Gets joystick hat value. |
Functions |
|
NumJoysticks |
Gets the number of attached joysticks. |
Open |
Opens a joystick if possible. |