![]() |
NDEVR
API Documentation
|
Settings that define how a Joystick will behave. More...
Public Types | |
| enum | SensitivityMode { e_linear , e_exponential , e_sinusoidal } |
| The method used to map raw joystick displacement to output sensitivity. More... | |
Public Member Functions | |
| void | getINI (INIFactory &factory) override |
| Serializes or deserializes the joystick settings to or from an INI file. | |
| bool | operator== (const JoystickSettings &settings) const |
| Checks equality between two JoystickSettings objects. | |
| void | resetToDefaults () |
| Resets all joystick settings to their default values. | |
| Public Member Functions inherited from INIInterface | |
| INIInterface () | |
| Constructs an INIInterface with no default INI file. | |
| INIInterface (const File &default_ini) | |
| Constructs an INIInterface with the specified default INI file. | |
| virtual | ~INIInterface () |
| Virtual destructor for safe polymorphic cleanup. | |
| virtual void | finishReadingINI (INIFactory &) |
| Called after reading an INI file. | |
| virtual void | prepareForINI (INIFactory &) |
| Called before reading or writing an INI file. | |
| virtual bool | readINIOptions () |
| Reads INI options from the default INI file. | |
| virtual bool | readINIOptions (File &ini_file) |
| Reads INI options from the specified INI file. | |
| virtual bool | saveINIOptions (bool multithead=false) |
| Saves INI options to the default INI file. | |
| virtual bool | saveINIOptions (File &ini_file, bool multithead=false) |
| Saves INI options to the specified INI file. | |
| void | setDefaultINIFile (const File &file) |
| Sets the default INI file path used for reading and writing options. | |
| virtual void | writeToLog (const StringView &title, LogPtr log, uint01 log_level=2U) |
| Writes the current INI options to the specified log with a title. | |
| virtual void | writeToLog (LogPtr log, uint01 log_level=2U) |
| Writes the current INI options to the specified log. | |
Public Attributes | |
| fltp04 | deadzone = 0.05f |
| The minimum displacement threshold before input is registered. | |
| fltp04 | sensitivity = 1.0f |
| The overall sensitivity multiplier applied to joystick output. | |
| SensitivityMode | sensitivity_mode = SensitivityMode::e_exponential |
| The curve used to map displacement to output. | |
| bool | uses_buttons = false |
| Whether directional arrow buttons are enabled on the joystick. | |
| bool | uses_knob = true |
| Whether the draggable knob is enabled on the joystick. | |
Additional Inherited Members | |
| Protected Attributes inherited from INIInterface | |
| File | m_default_ini |
| The default file path used for reading and writing INI options. | |
The method used to map raw joystick displacement to output sensitivity.
| Enumerator | |
|---|---|
| e_linear | Linear mapping from displacement to output. |
| e_exponential | Exponential mapping, giving finer control near center. |
| e_sinusoidal | Sinusoidal mapping for smooth acceleration curve. |
Definition at line 53 of file Joystick.h.
|
overridevirtual |
Serializes or deserializes the joystick settings to or from an INI file.
| [in] | factory | The INI factory used for reading or writing settings. |
Implements INIInterface.
|
inline |
Checks equality between two JoystickSettings objects.
| [in] | settings | The other settings to compare against. |
Definition at line 67 of file Joystick.h.
References deadzone, sensitivity, sensitivity_mode, uses_buttons, and uses_knob.