|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/Input/InputManager.hpp>
Public Member Functions | |
| InputManager (InputProvider &provider) noexcept | |
| Create a new input manager. | |
| InputManager (const InputManager &)=delete | |
| InputManager & | operator= (const InputManager &)=delete |
| ~InputManager () | |
| Destroys the input manager. | |
| InputAction & | action (const StringView &name) |
| Gets a action by it's name. | |
| const InputAction & | action (const StringView &name) const |
| Gets a action by it's name. | |
| InputRange & | range (const StringView &name) |
| Gets a range by it's name. | |
| const InputRange & | range (const StringView &name) const |
| Gets a range by it's name. | |
| InputContext & | add (const StringView &contextName) |
| Adds a new input context. | |
| void | remove (const StringView &contextName) |
| Removes a input context. | |
| InputContext & | context (const StringView &contextName) |
| Gets a input context by name. | |
| const InputContext & | context (const StringView &contextName) const |
| Gets a input context by name. | |
| void | update () |
| Update input actions and ranges. | |
| void | setCursorMode (CursorMode mode) |
| Sets the cursor mode. | |
| const InputState & | getInputState () const noexcept |
| The current state of input. | |
Public Attributes | |
| Event< void(const AnyInputEvent &)> | didReceiveEvent |
| Event< void(const KeyEvent &)> | onKeyDown |
| Event< void(const KeyEvent &)> | onKeyUp |
| Event< void(const MouseEvent &)> | onMouseDown |
| Event< void(const MouseEvent &)> | onMouseUp |
| Event< void(const MouseEvent &)> | onMouseMove |
| Event< void(const MouseEvent &)> | onMouseDrag |
| Event< void(const MouseEvent &)> | onMouseScroll |
| Event< void(const TextEvent &)> | onTextInput |
Private Attributes | |
| Map< String, InputContext > | contexts |
| A map of all active contexts. | |
| InputProvider & | provider |
| The input provider to fetch input state from. | |
| InputState | mInputState |
| The current state of input. | |
|
explicitnoexcept |
Create a new input manager.
| provider | The InputProvider to capture input state from |
|
delete |
| CeresEngine::InputManager::~InputManager | ( | ) |
Destroys the input manager.
| InputAction & CeresEngine::InputManager::action | ( | const StringView & | name | ) |
Gets a action by it's name.
| name | The action name |
| const InputAction & CeresEngine::InputManager::action | ( | const StringView & | name | ) | const |
Gets a action by it's name.
| name | The action name |
| InputContext & CeresEngine::InputManager::add | ( | const StringView & | contextName | ) |
Adds a new input context.
| contextName | The input context name |
| InputContext & CeresEngine::InputManager::context | ( | const StringView & | contextName | ) |
Gets a input context by name.
| contextName | The input context name |
| const InputContext & CeresEngine::InputManager::context | ( | const StringView & | contextName | ) | const |
Gets a input context by name.
| contextName | The input context name |
|
inlinenoexcept |
The current state of input.
This object is updated on the update() method based on the events queued from the provider.
|
delete |
| InputRange & CeresEngine::InputManager::range | ( | const StringView & | name | ) |
Gets a range by it's name.
| name | The range name |
| const InputRange & CeresEngine::InputManager::range | ( | const StringView & | name | ) | const |
Gets a range by it's name.
| name | The range name |
| void CeresEngine::InputManager::remove | ( | const StringView & | contextName | ) |
Removes a input context.
| contextName | The input context to be removed |
| void CeresEngine::InputManager::setCursorMode | ( | CursorMode | mode | ) |
Sets the cursor mode.
| mode | The cursor mode to be set |
| void CeresEngine::InputManager::update | ( | ) |
Update input actions and ranges.
|
private |
A map of all active contexts.
| Event<void(const AnyInputEvent&)> CeresEngine::InputManager::didReceiveEvent |
|
private |
The current state of input.
This object is updated on the update() method based on the events queued from the provider.
| Event<void(const MouseEvent&)> CeresEngine::InputManager::onMouseDown |
| Event<void(const MouseEvent&)> CeresEngine::InputManager::onMouseDrag |
| Event<void(const MouseEvent&)> CeresEngine::InputManager::onMouseMove |
| Event<void(const MouseEvent&)> CeresEngine::InputManager::onMouseScroll |
| Event<void(const MouseEvent&)> CeresEngine::InputManager::onMouseUp |
|
private |
The input provider to fetch input state from.