#include <joystick.h>
|
| static void | init () |
| | Initializes the joystick subsystem.
|
| |
| static int | getNumberOfJoysticks () |
| | Returns the number of available joysticks.
|
| |
Definition at line 26 of file joystick.h.
◆ anonymous enum
Number of buttons we can handle.
Definition at line 32 of file joystick.h.
◆ anonymous enum
Directions, to be used as bitmask values.
| Enumerator |
|---|
| UP | |
| DOWN | |
| LEFT | |
| RIGHT | |
Definition at line 40 of file joystick.h.
◆ Joystick()
| Joystick::Joystick |
( |
int |
no | ) |
|
Constructor, pass the number of the joystick the new object should access.
Definition at line 44 of file joystick.cpp.
◆ ~Joystick()
◆ buttonPressed()
| bool Joystick::buttonPressed |
( |
unsigned char |
no | ) |
const |
◆ doCalibration()
| void Joystick::doCalibration |
( |
| ) |
|
|
protected |
◆ finishCalibration()
| void Joystick::finishCalibration |
( |
| ) |
|
◆ getNumberOfJoysticks()
| static int Joystick::getNumberOfJoysticks |
( |
| ) |
|
|
inlinestatic |
Returns the number of available joysticks.
Definition at line 56 of file joystick.h.
◆ init()
Initializes the joystick subsystem.
Definition at line 31 of file joystick.cpp.
◆ isCalibrating()
| bool Joystick::isCalibrating |
( |
| ) |
const |
|
inline |
◆ isDown()
| bool Joystick::isDown |
( |
| ) |
const |
|
inline |
◆ isEnabled()
| bool Joystick::isEnabled |
( |
| ) |
const |
|
inline |
◆ isLeft()
| bool Joystick::isLeft |
( |
| ) |
const |
|
inline |
◆ isRight()
| bool Joystick::isRight |
( |
| ) |
const |
|
inline |
◆ isUp()
| bool Joystick::isUp |
( |
| ) |
const |
|
inline |
◆ setEnabled()
| void Joystick::setEnabled |
( |
bool |
enabled | ) |
|
|
inline |
◆ startCalibration()
| void Joystick::startCalibration |
( |
| ) |
|
◆ update()
| void Joystick::update |
( |
| ) |
|
Updates the direction and button information.
Definition at line 75 of file joystick.cpp.
◆ joystickCount
| int Joystick::joystickCount = 0 |
|
staticprotected |
◆ mButtons
◆ mCalibrating
| bool Joystick::mCalibrating |
|
protected |
◆ mDirection
| unsigned char Joystick::mDirection |
|
protected |
◆ mDownTolerance
| int Joystick::mDownTolerance |
|
protected |
◆ mEnabled
◆ mJoystick
| SDL_Joystick* Joystick::mJoystick |
|
protected |
◆ mLeftTolerance
| int Joystick::mLeftTolerance |
|
protected |
◆ mRightTolerance
| int Joystick::mRightTolerance |
|
protected |
◆ mUpTolerance
| int Joystick::mUpTolerance |
|
protected |
The documentation for this class was generated from the following files: