Base class for joystick driver primitives
A driver primitive can be:
- a button
- a hat direction
- a semiaxis (either the positive or negative half of an axis)
- a motor
- a keyboard key
- a mouse button
- a relative pointer direction
The type determines the fields in use:
Button:
Hat direction:
- driver index
- hat direction
Semiaxis:
- driver index
- center
- semiaxis direction
- range
Motor:
Key:
Mouse button:
Relative pointer direction:
- relative pointer direction
◆ DriverPrimitive() [1/5]
Construct an invalid driver primitive.
◆ CreateButton()
Construct a driver primitive representing a joystick button.
- Parameters
-
- Returns
- Created class
◆ DriverPrimitive() [2/5]
Construct a driver primitive representing one of the four direction arrows on a dpad.
- Parameters
-
◆ DriverPrimitive() [3/5]
Construct a driver primitive representing the positive or negative half of an axis.
- Parameters
-
◆ CreateMotor()
Construct a driver primitive representing a motor.
- Parameters
-
[in] | motorIndex | Motor index number |
- Returns
- Constructed driver primitive representing a motor
◆ DriverPrimitive() [4/5]
Construct a driver primitive representing a key on a keyboard.
- Parameters
-
[in] | keycode | Keycode to use |
◆ CreateMouseButton()
Construct a driver primitive representing a mouse button.
- Parameters
-
- Returns
- Constructed driver primitive representing a mouse button
◆ DriverPrimitive() [5/5]
Construct a driver primitive representing one of the four direction in which a relative pointer can move.
- Parameters
-
◆ Type()
◆ DriverIndex()
unsigned int DriverIndex |
( |
void |
| ) |
const |
|
inline |
Get driver index.
- Returns
- Index number
◆ HatDirection()
◆ Center()
int Center |
( |
void |
| ) |
const |
|
inline |
Get center.
- Returns
- Center
◆ SemiAxisDirection()
◆ Range()
unsigned int Range |
( |
void |
| ) |
const |
|
inline |
◆ Keycode()
const std::string& Keycode |
( |
void |
| ) |
const |
|
inline |
Get key code as string.
- Returns
- Key code
◆ MouseIndex()
◆ RelPointerDirection()
◆ operator==()
Compare this with another class of this type.
- Parameters
-
[in] | other | Other class to compare |
- Returns
- True if they are equal, false otherwise