|
Gainput
v1.0.0
|
State of an input device. More...
#include <GainputInputState.h>
Public Member Functions | |
| InputState (Allocator &allocator, unsigned int buttonCount) | |
| Initializes the state. More... | |
| ~InputState () | |
| Unitializes the state. | |
| unsigned | GetButtonCount () const |
| Returns the number of buttons in this state. More... | |
| bool | GetBool (DeviceButtonId buttonId) const |
| Returns the bool state of the given device button. | |
| void | Set (DeviceButtonId buttonId, bool value) |
| Sets the bool state of the given device button. | |
| float | GetFloat (DeviceButtonId buttonId) const |
| Returns the float state of the given device button. | |
| void | Set (DeviceButtonId buttonId, float value) |
| Sets the float state of the given device button. | |
| InputState & | operator= (const InputState &other) |
| Sets the states of all buttons in this input state to the states of all buttons in the given input state. | |
State of an input device.
| gainput::InputState::InputState | ( | Allocator & | allocator, |
| unsigned int | buttonCount | ||
| ) |
Initializes the state.
| allocator | The allocator to be used for all memory allocations. |
| buttonCount | The maximum number of device buttons. |
|
inline |
Returns the number of buttons in this state.
Note that not all buttons may be valid.
1.8.13