Stores bindings of actions to callbacks.
More...
#include <le2d/input/action_mapping.hpp>
Stores bindings of actions to callbacks.
◆ ActionMapping()
| le::input::ActionMapping::ActionMapping |
( |
| ) |
|
|
default |
◆ bind_action()
| void le::input::ActionMapping::bind_action |
( |
gsl::not_null< IAction * > |
action, |
|
|
OnAction |
on_action |
|
) |
| |
Bind an action to a callback.
- Parameters
-
| action | Persistent pointer to target action. |
| on_action | action callback. |
◆ clear_bindings()
| void le::input::ActionMapping::clear_bindings |
( |
| ) |
|
|
inline |
Remove all existing bindings.
◆ disengage()
| void le::input::ActionMapping::disengage |
( |
| ) |
|
|
overridevirtual |
◆ dispatch()
Process events and dispatch callbacks.
- Parameters
-
| events | List of events for this frame. |
| gamepads | Gamepad manager instance. |
Implements le::input::IMapping.
◆ unbind_action()
| void le::input::ActionMapping::unbind_action |
( |
gsl::not_null< IAction const * > |
action | ) |
|
Remove existing bindings for an action, if any.
- Parameters
-
| action | Action to remove bindings for. |
The documentation for this class was generated from the following file: