|
GamepadInput Arduino Lib 1.2.0
|
Tracks changes in gamepad input between frames. More...
#include <gamepad_input_tracker.h>
Public Member Functions | |
| const State & | raw () const noexcept |
| Get the current input state. | |
| void | Reset () noexcept |
| Reset tracker state to neutral. | |
| void | Tick () noexcept |
| Advance to next frame (swap states). | |
| void | Update (State state) noexcept |
| Update current frame input state. | |
| bool | pressed (Button button) const noexcept |
| Detect button press (falling edge). | |
| bool | released (Button button) const noexcept |
| Detect button release (rising edge). | |
| bool | holding (Button button) const noexcept |
| Detect button hold. | |
| bool | AxisChanged (Axis axis, uint8_t threshold) const noexcept |
| Detect axis movement. | |
| bool | operator[] (Button button) const noexcept |
| Check if a button is pressed. | |
| uint8_t | operator[] (Axis axis) const noexcept |
| Get axis value. | |
Tracks changes in gamepad input between frames.
Useful for detecting button press, release, hold, and significant axis movement.
Definition at line 24 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Detect axis movement.
| threshold | Threshold for detecting axis movement |
Definition at line 117 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Detect button hold.
Definition at line 103 of file gamepad_input_tracker.h.
|
inlinenoexcept |
|
inlinenoexcept |
Check if a button is pressed.
Definition at line 131 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Detect button press (falling edge).
Definition at line 79 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Get the current input state.
Definition at line 34 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Detect button release (rising edge).
Definition at line 91 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Reset tracker state to neutral.
Definition at line 44 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Advance to next frame (swap states).
Definition at line 57 of file gamepad_input_tracker.h.
|
inlinenoexcept |
Update current frame input state.
Definition at line 67 of file gamepad_input_tracker.h.