Persistent game choices for the options menu.
More...
#include <gamesettings.h>
Persistent game choices for the options menu.
◆ GameSettings()
Build available options from the configuration, installed packs, and display modes.
- Parameters
-
| config | The mutable configuration. Its lifetime must exceed the settings model's. |
| dataRoots | The directories searched for selectable asset packs. |
| displayResolutions | Available output widths and heights, in pixels. |
◆ Count()
- Returns
- The number of options available in this settings model.
◆ SetOverrides()
| void coastline::GameSettings::SetOverrides |
( |
GameConfig | overrides | ) |
|
Replace temporary values supplied by command-line arguments without saving them.
- Parameters
-
| overrides | Settings that take precedence over saved values and disable matching options. |
◆ IsEnabled()
| bool coastline::GameSettings::IsEnabled |
( |
std::size_t | index | ) |
const |
- Parameters
-
| index | The zero-based option index. |
- Returns
- Whether the option is valid and is not controlled by a command-line override.
◆ Label()
- Parameters
-
| index | The zero-based option index. |
- Returns
- The option label and its selected value, or empty text for an invalid index.
◆ RequiresRestart()
| bool coastline::GameSettings::RequiresRestart |
( |
std::size_t | index | ) |
const |
- Parameters
-
| index | The zero-based option index. |
- Returns
- Whether the option requires rebuilding the game session, or false for an invalid index. For graphics presets, the result reflects the most recent preset adjustment.
◆ Step()
| bool coastline::GameSettings::Step |
( |
std::size_t | index, |
|
|
int | direction ) |
Cycle a setting in either direction.
Invalid or locked options, zero steps, and options with fewer than two choices are ignored.
- Parameters
-
| index | The zero-based option index. |
| direction | A negative value for the previous choice, positive for the next. |
- Returns
- Whether the configuration changed.
◆ FinishPresetSelection()
| void coastline::GameSettings::FinishPresetSelection |
( |
| ) |
|
End preset browsing; the next preset adjustment captures a new baseline.
The documentation for this class was generated from the following file: