|
Player12
An open source football management simulator
|
Scene for managing application settings. More...
#include <settings_scene.h>
Classes | |
| struct | Capture |
| struct | Conflict |
Public Member Functions | |
| SettingsScene (GUIView *guiView_ptr) | |
| Constructs a new SettingsScene. | |
| SettingsScene (GUIView *guiView_ptr, bool inCareer) | |
| Constructs a SettingsScene opened from inside a career. | |
| ~SettingsScene ()=default | |
| Destroys the SettingsScene. | |
| void | update (float deltaTime) override |
| Updates scene logic. | |
| void | render () override |
| Renders the scene. | |
| void | onEnter () override |
| Called when entering the scene. | |
| SceneID | getID () const override |
| Gets the ID of this scene. | |
Public Member Functions inherited from GUIScene | |
| GUIScene (GUIView *guiView_ptr) | |
| Constructs a new GUIScene. | |
| virtual | ~GUIScene ()=default |
| Destroys the GUIScene. | |
| virtual void | handleEvent (const SDL_Event &event) |
| Handles SDL events for the scene. | |
| virtual void | onExit () |
| Called when the scene is exited/becomes inactive. | |
| virtual void | onResume () |
| Called when an overlay above this scene closes and it becomes the active scene again. Screens use it to refresh cached view models after a match, a transfer or any other state change made elsewhere. | |
| virtual void | onResize (int width, int height) |
| Called when the window is resized. | |
| virtual std::optional< NavEntry > | historyEntry () const |
| How to open this screen again from the navigation history, or nothing for scenes outside it (menus, team selection, the live match). | |
Private Member Functions | |
| void | applyAndSaveSettings () |
| void | cancel () |
| void | leave () |
| void | resetToDefaults () |
| void | syncPendingFromSettings () |
| void | renderGeneral () |
| void | renderAppearance () |
| void | renderGuidance () |
| void | renderAudio () |
| void | renderControls () |
| void | renderControlRow (Input::ActionId id, const Input::Action &action, float labelWidth) |
| void | renderData () |
| void | renderSaving () |
| void | previewAppearance () |
| void | updateCapture () |
Private Attributes | |
| std::vector< std::string > | languageOptions |
| std::vector< Language > | availableLanguageEnums |
| std::vector< GUIConstants::Resolution > | resolutions |
| std::vector< std::string > | resolutionOptions |
| std::vector< std::string > | fpsOptionsStrings |
| int | selectedLanguage = 0 |
| int | selectedFPS = 0 |
| int | selectedResolution = 0 |
| bool | fullscreen = false |
| bool | vsync = false |
| bool | showWipeDataOverlay = false |
| float | wipeDataTimer = 0.0f |
| bool | in_career = false |
| Settings | original_settings |
| float | pending_ui_scale = 1.0f |
| float | pending_text_scale = 1.0f |
| std::optional< Capture > | capture |
| std::optional< Conflict > | conflict |
| int | capture_end_frame = -1 |
| std::vector< std::array< std::string, Input::BINDING_SLOTS > > | chord_labels |
| std::uint32_t | labels_revision = 0 |
Friends | |
| class | GameFlowTest_GUIFlowLifecycle_Test |
Additional Inherited Members | |
Protected Member Functions inherited from GUIScene | |
| SDL_Renderer * | getRenderer () const |
| Gets the SDL renderer. | |
| SDL_Window * | getWindow () const |
| Gets the SDL window. | |
| GUIView * | getGuiView () const |
| Gets the associated GUIView. | |
| void | changeScene (std::unique_ptr< GUIScene > newScene) |
| Requests a scene change. | |
| void | quit () |
| Requests the application to quit. | |
Protected Attributes inherited from GUIScene | |
| GUIView * | guiView |
Scene for managing application settings.
Appearance, audio, match, guidance and control changes apply at once (a live preview; Cancel restores them). Language and the display settings (resolution, frame cap, fullscreen, VSync) apply when the player presses Apply. Every row explains itself in a tooltip.
|
explicit |
Constructs a new SettingsScene.
| guiView_ptr | Pointer to the GUIView. |
| SettingsScene::SettingsScene | ( | GUIView * | guiView_ptr, |
| bool | inCareer | ||
| ) |
Constructs a SettingsScene opened from inside a career.
| guiView_ptr | Pointer to the GUIView. |
| inCareer | When true, leaving the scene returns to the career instead of the main menu, and save wiping is not offered. |
|
default |
Destroys the SettingsScene.
|
private |
|
private |
|
overridevirtual |
|
private |
|
overridevirtual |
Called when entering the scene.
Reimplemented from GUIScene.
|
private |
|
overridevirtual |
Renders the scene.
Implements GUIScene.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Restores every setting but the language (and seen tips).
|
private |
Points the Apply-time widgets at the current settings.
|
overridevirtual |
|
private |
Handles a key pressed while a binding waits for one.
|
friend |
|
private |
|
private |
|
private |
Frame a capture ended on: Space/Enter must not also press a button.
|
private |
Chord labels per action and slot, rebuilt when a binding changes.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |