Expand description
The player’s settings: the engine’s (how fast dialogue text is
revealed, whether the game fills the screen, the color theme, the
music and sound volumes, the frame cap and the layout picked) and the
game’s own
(Settings::game, a GameSettings). Ctx loads
them with its storage, from one record under SETTINGS_KEY in the
profile in use, whose form the game decides
(GameSettings::to_ron); it saves them when they change
(Ctx::change_settings). Key bindings
are saved apart.
Structs§
- Background
- What a game does while its window has no focus
(
GameSettings::BACKGROUND): whether it pauses, and what its sound does. A game writes it fromKEEP_RUNNING:Background::KEEP_RUNNING.paused().muted(). - Settings
- Everything an options screen sets: the engine’s settings and the game’s. The defaults are a new player’s.
Enums§
- Background
Audio - What the game’s sound does while its window has no focus.
- Text
Speed - How fast dialogue text is revealed.
Constants§
- DEFAULT_
VOLUME - The volume settings’ default. Tunable.
- MAX_
VOLUME - The loudest volume setting; 0 is silent.
- SETTINGS_
KEY Storagekey under which the settings are saved (Settings::to_ron).
Traits§
- Game
Settings - The settings a game adds to the engine’s, and the saved form of both: one record, so the game decides its form (and keeps the one it has always written).