Struct ButtonTickState
Defined in File tick-input.h
Struct Documentation
-
struct ButtonTickState
Button activity since the previous simulation consumption.
Durations use poll observation times, not unreported hardware times.
Public Functions
-
inline bool held() const
Declaration:
[[nodiscard]]Return final held state.
-
inline bool pressed() const
Declaration:
[[nodiscard]]Return whether at least one press occurred, even if released by this tick’s end.
-
inline bool released() const
Declaration:
[[nodiscard]]Return whether at least one release occurred, independently of final state.
Public Members
-
bool current = false
Final held state at the consumption boundary.
-
bool previous = false
Held state at the preceding consumption boundary.
-
bool pressed_this_tick = false
At least one press in consumed polls.
-
bool released_this_tick = false
At least one release in consumed polls.
-
std::uint64_t press_count = 0
Sum of observed press transitions in the batch.
-
std::uint64_t release_count = 0
Sum of observed release transitions in the batch.
-
CE::Input::ObservationDuration held_duration = {}
Active hold age in observation seconds, or zero after release.
-
CE::Input::ObservationDuration down_duration = {}
Observed down-time within this consumption interval, in seconds.
-
std::vector<CE::Input::ObservationDuration> completed_holds
Owned full durations of each hold released in this batch.
-
inline bool held() const