|
ApolloInput Nova 0.2.0
Standalone virtual gamepad library
|
One complete gamepad input report. More...
#include <gamepad.hpp>
Public Member Functions | |
| bool | pressed (Button button) const |
| Check whether a button is pressed. | |
| void | set (Button button, bool pressed) |
| Set or clear a button bit. | |
| void | clear () |
| Reset all buttons, triggers, and sticks. | |
Public Attributes | |
| std::uint32_t | buttons = 0 |
| Bit mask of Button values. | |
| std::uint8_t | left_trigger = 0 |
| 0-255. | |
| std::uint8_t | right_trigger = 0 |
| 0-255. | |
| std::int16_t | left_x = 0 |
| -32768 to 32767. | |
| std::int16_t | left_y = 0 |
| -32768 to 32767. | |
| std::int16_t | right_x = 0 |
| -32768 to 32767. | |
| std::int16_t | right_y = 0 |
| -32768 to 32767. | |
One complete gamepad input report.
Definition at line 105 of file gamepad.hpp.
|
inline |
Reset all buttons, triggers, and sticks.
Definition at line 141 of file gamepad.hpp.
|
inline |
Check whether a button is pressed.
| button | Button to query. |
Definition at line 120 of file gamepad.hpp.
|
inline |
Set or clear a button bit.
| button | Button to update. |
| pressed | New pressed state. |
Definition at line 130 of file gamepad.hpp.
| std::uint32_t apollo::input::GamepadState::buttons = 0 |
Bit mask of Button values.
Definition at line 106 of file gamepad.hpp.
| std::uint8_t apollo::input::GamepadState::left_trigger = 0 |
0-255.
Definition at line 107 of file gamepad.hpp.
| std::int16_t apollo::input::GamepadState::left_x = 0 |
-32768 to 32767.
Definition at line 109 of file gamepad.hpp.
| std::int16_t apollo::input::GamepadState::left_y = 0 |
-32768 to 32767.
Definition at line 110 of file gamepad.hpp.
| std::uint8_t apollo::input::GamepadState::right_trigger = 0 |
0-255.
Definition at line 108 of file gamepad.hpp.
| std::int16_t apollo::input::GamepadState::right_x = 0 |
-32768 to 32767.
Definition at line 111 of file gamepad.hpp.
| std::int16_t apollo::input::GamepadState::right_y = 0 |
-32768 to 32767.
Definition at line 112 of file gamepad.hpp.