Engine → Platform → input_state.h
gamepad_state
| Type | Struct |
| Namespace | conjure::platform |
| Include File Path | engine/include/conjure/platform/input_state.h |
| Source File Path | engine/src/platform/input_state.cpp |
| API ↗ | Input |
Syntax
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| public | axes | std:: | {} | |
| public | buttonsDown | u32 | 0 | |
| public | buttons | u32 | 0 | |
| public | buttons | u32 | 0 | |
| public | connected | bool | false |
Functions
Public
axis
axis[[nodiscard]] f32 axis(
gamepad_axis axisId) const noexcept;The axis value; 0 for an invalid axis.
is_down
is_down[[nodiscard]] bool is_down(
gamepad_button button) const noexcept;True while the button is down, including the frame it was pressed in (is_held leaves that frame out); false for an invalid button.
is_held
is_held[[nodiscard]] bool is_held(
gamepad_button button) const noexcept;True while the button is down and this is not the frame it was pressed in; false for an invalid button.
is_pressed
is_pressed[[nodiscard]] bool is_pressed(
gamepad_button button) const noexcept;True in the frame the button went down; false for an invalid button.
is_released
is_released[[nodiscard]] bool is_released(
gamepad_button button) const noexcept;True in the frame the button came up; false for an invalid button.