Stack of mappings, routes events to the topmost one.
More...
#include <le2d/input/router.hpp>
Stack of mappings, routes events to the topmost one.
◆ clear_stack()
| void le::input::Router::clear_stack |
( |
| ) |
|
|
inline |
◆ disengage()
| void le::input::Router::disengage |
( |
| ) |
|
Disengage the topmost mapping, if any.
◆ dispatch()
| void le::input::Router::dispatch |
( |
std::span< le::Event const > |
events | ) |
|
Dispatch events to the topmost mapping, if any.
- Parameters
-
| events | List of events for this frame. |
◆ gamepad_manager()
◆ is_stack_empty()
| auto le::input::Router::is_stack_empty |
( |
| ) |
const -> bool |
|
inline |
- Returns
- true if there are no mappings pushed.
◆ last_used_device()
| auto le::input::Router::last_used_device |
( |
| ) |
const -> std::optional<Device> |
|
inline |
- Returns
- Last used input device, if any.
◆ pop_mapping()
| void le::input::Router::pop_mapping |
( |
| ) |
|
Pop the topmost mapping, if any.
◆ push_mapping()
| void le::input::Router::push_mapping |
( |
gsl::not_null< IMapping * > |
mapping | ) |
|
Push a mapping to the top.
- Parameters
-
| mapping | Mapping to push. Disengages the existing topmost mapping before pushing. |
◆ remove_mapping()
| void le::input::Router::remove_mapping |
( |
gsl::not_null< IMapping const * > |
mapping | ) |
|
Remove a particular mapping, if mapped.
◆ nonzero_dead_zone
Dead zone for setting first/last used Gamepad.
The documentation for this class was generated from the following file: