![]() |
CUGL 4.0
Cornell University Game Library
|
#include <CUGamepad.h>
Public Member Functions | |
| GamepadButtonEvent () | |
| GamepadButtonEvent (const std::string key, Gamepad::Button index, bool dwn, const Timestamp &stamp) | |
Public Attributes | |
| Timestamp | timestamp |
| std::string | uuid |
| Gamepad::Button | button |
| bool | down |
This simple class is a struct to hold information about button presses
A button has only two states: up and down. This event will fire only when this state changes.
|
inline |
Constructs a new button event with the default values
|
inline |
Constructs a new button event with the given values
| key | The device UID |
| index | The button index |
| dwn | Whether the button is pressed |
| stamp | The timestamp for the event |
| Gamepad::Button cugl::GamepadButtonEvent::button |
The button reference
| bool cugl::GamepadButtonEvent::down |
Whether the button event is from a press (not a release)
| Timestamp cugl::GamepadButtonEvent::timestamp |
The time of the input event
| std::string cugl::GamepadButtonEvent::uuid |
The UID of the relevant device