ludus::input::ActionState¶
Ludus Wiki · API overview · Browse API
Struct
The current value and per-step edge flags for one action.
Button: Value is 1 when active, else 0. Pressed is a false->true aggregate transition within the step; Released is true->false. Axis1D: Value is the final aggregate (-1/0/+1); Pressed/Released mean inactive<->active where active is nonzero. A +1 to -1 change without an intervening zero changes Value but is NOT a new Pressed. Cancelled marks an action that a reset/map-replace cancelled; it can coexist with a fresh Pressed later in the same step and does NOT fabricate a Released. Flags are OR-accumulated over the step.
Declared in modules/input/include/ludus/input/actions.h
#include <ludus/input/actions.h>
struct ludus::input::ActionState final
Fields¶
Kind¶
ActionKind ludus::input::ActionState::Kind = ActionKind::Button
Related types: ActionKind
Declared in modules/input/include/ludus/input/actions.h
Value¶
float32 ludus::input::ActionState::Value = 0.0F
Related types: float32
Declared in modules/input/include/ludus/input/actions.h
Pressed¶
bool ludus::input::ActionState::Pressed = false
Declared in modules/input/include/ludus/input/actions.h
Released¶
bool ludus::input::ActionState::Released = false
Declared in modules/input/include/ludus/input/actions.h
Cancelled¶
bool ludus::input::ActionState::Cancelled = false