|
R-Type 0.1
|
Table binding up to four physical controls to each of 32 actions. More...
#include <inputAction/inputMapping.hpp>
Public Member Functions | |
| void | bindKey (uint8_t bitIndex, ecs::concepts::Key key) |
| Binds a keyboard key to an action. | |
| void | bindGamepad (uint8_t bitIndex, ecs::concepts::GamepadButton button) |
| Binds a gamepad button to an action. | |
| void | bindMouse (uint8_t bitIndex, ecs::concepts::MouseButton mouseButton) |
| Binds a mouse button to an action. | |
| void | bindGamepadAxis (uint8_t bitIndex, ecs::concepts::GamepadAxis axis, float validationPression) |
| Binds a gamepad axis to an action. | |
| const std::array< InputBinding, MAX_ACTIONS *BINDINGS_PER_ACTION > & | getBindings () const |
| Returns every binding slot. | |
Static Public Attributes | |
| static constexpr uint8_t | MAX_ACTIONS = 32 |
| Number of actions, one per bit of InputState::actionMask. | |
| static constexpr uint8_t | BINDINGS_PER_ACTION = 4 |
| Number of controls that can trigger the same action. | |
Table binding up to four physical controls to each of 32 actions.
|
inline |
Binds a keyboard key to an action.
| bitIndex | Action index, from 0 to 31. |
| key | Key to bind. |
|
inline |
Binds a gamepad button to an action.
| bitIndex | Action index, from 0 to 31. |
| button | Button to bind. |
|
inline |
Binds a mouse button to an action.
| bitIndex | Action index, from 0 to 31. |
| mouseButton | Button to bind. |
|
inline |
Binds a gamepad axis to an action.
| bitIndex | Action index, from 0 to 31. |
| axis | Axis to bind. |
| validationPression | Threshold, negative values trigger below it. |
|
inline |
Returns every binding slot.