#include <CeresEngine/Input/InputContext.hpp>
◆ InputContext() [1/2]
| CeresEngine::InputContext::InputContext |
( |
InputManager & |
manager | ) |
|
|
explicitnoexcept |
Creates a new InputContext.
- Parameters
-
| manager | The owning input manager |
◆ InputContext() [2/2]
◆ ~InputContext()
| CeresEngine::InputContext::~InputContext |
( |
| ) |
|
Destroys the input context.
◆ action() [1/2]
Gets a action by it's name.
- Parameters
-
- Returns
- A reference to the action
◆ action() [2/2]
Gets a action by it's name.
- Parameters
-
- Returns
- A reference to the action
◆ active()
| void CeresEngine::InputContext::active |
( |
bool |
state | ) |
|
|
noexcept |
Changes the active or inactive state of the context.
- Parameters
-
| state | If true, will activate the context, if false will deactivate it. |
◆ add()
Add a new Action or Range to the context.
- Template Parameters
-
| T | the Action or Range subtype |
| Args | the action or range constructor types |
- Parameters
-
| name | The action or range name |
| args | The action or range constructor types |
- Returns
- A reference to the newly created
Action or Range object.
◆ addAction()
Add a new action with the given name.
- Parameters
-
| name | The action name |
| action | A pointer to the action to be added |
- Returns
- A reference to the added action
◆ addRange()
Add a new range with the given name.
- Parameters
-
| name | The range name |
| range | A pointer to the range to be added |
- Returns
- A reference to the added range
◆ createAction()
template<CInputAction Action, typename... Args>
| Action & CeresEngine::InputContext::createAction |
( |
const StringView & |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineprivate |
Creates a new action with the given name and type Action.
- Template Parameters
-
| Action | the action type |
| Args | the action constructor argument types |
- Parameters
-
| name | The action name |
| args | The action constructor arguments |
- Returns
- A reference to the created action
◆ createRange()
template<CInputRange Range, typename... Args>
| Range & CeresEngine::InputContext::createRange |
( |
const StringView & |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineprivate |
Creates a new range with the given name and type Action.
- Template Parameters
-
| Range | the range type |
| Args | the range constructor argument types |
- Parameters
-
| name | The range name |
| args | The range constructor arguments |
- Returns
- A reference to the created range
◆ hasAction()
Checks if the context contains a action named name.
- Parameters
-
- Returns
- True if the action exists
◆ hasRange()
Checks if the context contains a range named name.
- Parameters
-
- Returns
- True if the range exists
◆ isActive()
| bool CeresEngine::InputContext::isActive |
( |
| ) |
const |
|
noexcept |
- Returns
- True if the context is active, false otherwise
◆ operator=()
◆ range() [1/2]
Gets a range by it's name.
- Parameters
-
- Returns
- A reference to the range
◆ range() [2/2]
Gets a range by it's name.
- Parameters
-
- Returns
- A reference to the range
◆ update()
Update all actions and ranges with the given input state.
- Parameters
-
| state | The input state to update with |
◆ InputManager
◆ actions
A map of all actions registered with the context.
◆ mActive
| bool CeresEngine::InputContext::mActive = true |
|
private |
The context active or inactive state.
◆ manager
◆ ranges
A map of all ranges registered with the context.
The documentation for this class was generated from the following file:
- /Users/Rogiel/Developer/CeresEngine/Engine/Sources/CeresEngine/Input/InputContext.hpp