FPlatformActionInput
Steam Input (or any platform with action-based controller input) as the gamepad half of InputActionSystem. Input contexts are action sets: the bottom enabled context is the active set and every context above it a layer, so pushing the "Scanner" context over "Gameplay" activates the Scanner layer in the player's Steam configuration. Engine action names are the Steam action names (the generated in_game_actions.vdf uses them).
- Module
- Game
- Header
#include "Game/PlatformActionInput.h"- Namespace
Mowo
Active only when the project opts in (Project Settings > Platform > Steam Input) and the platform reports a controller under its control; otherwise the engine reads the pad through SDL as before.
Public functions
| Returns | Name | Description |
|---|---|---|
FPlatformActionInput& | Get | |
void | Install | Installs the bridge on InputActionSystem (once, at engine start). |
void | Uninstall | |
void | SetServiceOverride | The service to talk to; null follows FOnlineServices::Primary(). |
void | SetEnabledOverride | Forces the project gate (platform.steamInputEnabled) for tests. |
bool | IsActive | |
void | BeginFrame | |
bool | ReadAction | |
const std::vector<std::string>& | GetActiveLayers |
Function details
Get
static FPlatformActionInput& Get()Install
static void Install()Installs the bridge on InputActionSystem (once, at engine start).
Uninstall
static void Uninstall()SetServiceOverride
void SetServiceOverride(IOnlineService* service)The service to talk to; null follows FOnlineServices::Primary(). Tests hand it a fake.
SetEnabledOverride
void SetEnabledOverride(int32_t enabled)Forces the project gate (platform.steamInputEnabled) for tests.
IsActive
bool IsActive() const overrideBeginFrame
void BeginFrame(const std::vector<std::string>& enabledContexts) overrideReadAction
bool ReadAction(const std::string& actionName, InputActionType type, Vec3& outValue) overrideGetActiveLayers
const std::vector<std::string>& GetActiveLayers() const