GamepadSettingsWidget Class
A configuration widget for adjusting gamepad input settings. More...
Declaration
Base class
| class | ImGuiWidget |
|
Abstract base class for ImGui widgets rendered in debug overlays. More... | |
Public Constructors Index
| GamepadSettingsWidget (helios::input::InputAdapter *inputAdapter) | |
|
Constructs the GamepadSettingsWidget. More... | |
Public Member Functions Index
| void | draw () override |
|
Renders the gamepad settings configuration interface. More... | |
Private Member Attributes Index
| helios::input::InputAdapter * | inputAdapter_ = nullptr |
|
Pointer to the InputAdapter used to access gamepad settings. Non-owning pointer; must be valid for the lifetime of this widget. More... | |
| int | selectedGamepadIndex_ = 0 |
|
The currently selected gamepad index in the UI combo box (0-3). More... | |
Private Static Functions Index
| static helios::input::types::Gamepad | indexToId (int index) noexcept |
|
Helper to map an integer index (0-3) to a Gamepad enum ID. More... | |
Description
A configuration widget for adjusting gamepad input settings.
This widget provides interactive controls for configuring per-gamepad settings including deadzone thresholds and axis inversion options. Changes are applied in real-time to the underlying InputAdapter's GamepadSettings.
**Features:**
- **Gamepad Selection:** Switch between controllers (1-4) via dropdown.
- **Deadzone Sliders:** Adjust left/right stick deadzone thresholds (0.0 to 0.9).
- **Axis Inversion:** Toggle X/Y axis inversion for both sticks.
- **Visual Feedback:** Deadzone values displayed as percentage.
Changes are applied immediately to the InputAdapter. No explicit save required.
This widget is not thread-safe. Use from the main/render thread only.
- See Also
GamepadSettings for the underlying configuration data.
- See Also
GamepadWidget for real-time input visualization.
Definition at line 39 of file GamepadSettingsWidget.ixx.
Public Constructors
GamepadSettingsWidget()
| inline explicit |
Constructs the GamepadSettingsWidget.
- Parameters
-
inputAdapter Pointer to the InputAdapter to configure. Pass nullptr to render a disabled widget.
Definition at line 78 of file GamepadSettingsWidget.ixx.
Public Member Functions
draw()
| inline virtual |
Renders the gamepad settings configuration interface.
Definition at line 84 of file GamepadSettingsWidget.ixx.
Private Member Attributes
inputAdapter_
|
Pointer to the InputAdapter used to access gamepad settings. Non-owning pointer; must be valid for the lifetime of this widget.
Definition at line 46 of file GamepadSettingsWidget.ixx.
selectedGamepadIndex_
|
The currently selected gamepad index in the UI combo box (0-3).
Definition at line 51 of file GamepadSettingsWidget.ixx.
Private Static Functions
indexToId()
| inline nodiscard noexcept static |
Helper to map an integer index (0-3) to a Gamepad enum ID.
- Parameters
-
index The index selected in the UI.
- Returns
The corresponding Gamepad enum value.
Definition at line 60 of file GamepadSettingsWidget.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.