IInputActionSource
A platform that reads controllers by ACTION rather than by button (Steam Input): the player's own bindings, action sets and the pad's glyphs live in the platform, and the game asks "is Scan pressed", not "is RT down". The Input module cannot see the platform layer, so the layer that can installs one of these on InputActionSystem.
- Module
- Input
- Header
#include "Input/InputActionSource.h"- Namespace
Mowo
While IsActive() the action system stops reading gamepad bindings itself — the platform has the pads, and reading them twice would double every press — and asks ReadAction instead. Keyboard and mouse bindings are read as always. Inactive (no platform, no controller under its control), the engine's own gamepad path is the fallback and nothing changes.
Constructors
| Signature | Name | Description |
|---|---|---|
virtual ~IInputActionSource() = default | ~IInputActionSource |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | IsActive | |
void | BeginFrame | Once per InputActionSystem::Update, before any action is read: the enabled contexts bottom first, so a source maps the bottom one onto its action set and the rest onto layers. |
bool | ReadAction | The action's value from the platform; false when the platform has no such action, which leaves the action to its keyboard/mouse bindings. |
Function details
~IInputActionSource
virtual ~IInputActionSource() = defaultIsActive
virtual bool IsActive() const = 0BeginFrame
virtual void BeginFrame(const std::vector<std::string>& enabledContexts) = 0Once per InputActionSystem::Update, before any action is read: the enabled contexts bottom first, so a source maps the bottom one onto its action set and the rest onto layers.
ReadAction
virtual bool ReadAction(const std::string& actionName, InputActionType type, Vec3& outValue) = 0The action's value from the platform; false when the platform has no such action, which leaves the action to its keyboard/mouse bindings.