62 void changeScene(std::unique_ptr<GUIScene> newScene);
95 void navigateTo(std::unique_ptr<GUIScene> scene);
192 void openEditor(
const std::optional<NavEntry>& context);
203 void update(
float deltaTime);
Base class for all GUI scenes.
Definition gui_scene.h:68
Main view manager for the GUI. Handles scenes and overlays.
Definition gui_view.h:29
std::unique_ptr< GUIScene > currentScene
Definition gui_view.h:230
bool initialize()
Definition gui_view.cpp:73
void overlayScene(std::unique_ptr< GUIScene > overlay)
Overlays a new scene on top of the current one.
Definition gui_view.cpp:433
size_t getOverlayDepth() const
Number of overlays currently stacked above the base scene.
Definition gui_view.cpp:455
SDL_Renderer * renderer
Definition gui_view.h:212
NavHistory & navHistory()
Screens visited in this career, recorded whenever the shown screen changes; cleared whenever the base...
Definition gui_view.h:116
~GUIView()
Destroys the GUIView.
Definition gui_view.cpp:45
void run()
Starts the scene run loop.
Definition gui_view.cpp:168
SDL_Texture * getBackdrop() const
Frozen frame from requestBackdropCapture(), or nullptr.
Definition gui_view.h:168
void navigateTo(std::unique_ptr< GUIScene > scene)
Routine navigation: removes every overlay and shows a new screen.
Definition gui_view.cpp:446
void quit()
Stops the run loop and quits.
Definition gui_view.cpp:564
PendingAction pendingAction
Definition gui_view.h:250
std::vector< std::unique_ptr< GUIScene > > sceneStack
Definition gui_view.h:233
SDL_Texture * backdropTexture
Definition gui_view.h:218
GUIScene * getTopScene() const
The scene shown now (the top overlay, else the base scene).
Definition gui_view.h:104
void requestBackdropCapture()
Freezes the frame being rendered into a texture at its end.
Definition gui_view.cpp:679
std::array< float, MATCH_FRAME_TIMING_COUNT > matchFrameTimes
Definition gui_view.h:224
GUIScene * getActiveScene() const
Definition gui_view.cpp:593
static constexpr int MATCH_FRAME_TIMING_COUNT
Definition gui_view.h:221
bool isBackdropPending() const
True until the requested frame has been frozen.
Definition gui_view.h:165
void openEditor(const std::optional< NavEntry > &context)
Definition gui_view.cpp:687
int matchFramesTimed
Definition gui_view.h:225
PendingAction
Definition gui_view.h:243
GUIScene * getBaseScene() const
The scene underneath all overlays (e.g. the club dashboard).
Definition gui_view.cpp:453
SDL_Window * window
Definition gui_view.h:211
SwipeGesture & swipeGesture()
Sideways touchpad swipe, shared by every career screen.
Definition gui_view.h:127
std::unique_ptr< RuntimeEditorDialog > editor_dialog
Definition gui_view.h:216
bool runMatchRenderProfile()
Profiles the first live-match frames and exits automatically.
Definition gui_view.cpp:207
SwipeGesture swipe_gesture
Definition gui_view.h:237
void beginMatchRenderTimings()
Definition gui_view.cpp:405
void applyPendingSceneChanges()
Definition gui_view.cpp:475
bool screenshotPending
Definition gui_view.h:214
SDL_Renderer * getRenderer() const
Gets the SDL renderer.
Definition gui_view.cpp:566
void update(float deltaTime)
Definition gui_view.cpp:310
void applyEditorRequest()
Definition gui_view.cpp:698
void popScene()
Pops the top overlaid scene.
Definition gui_view.cpp:440
NavHistory nav_history
Definition gui_view.h:235
friend class GameFlowTest
Definition gui_view.h:198
void render()
Definition gui_view.cpp:321
void applyManagementTheme()
Definition gui_view.cpp:616
std::unique_ptr< GUIScene > pendingScene
Definition gui_view.h:251
void releaseBackdrop()
Frees the frozen frame.
Definition gui_view.cpp:681
float displayScale() const
Definition gui_view.cpp:602
bool backdropPending
Definition gui_view.h:215
friend class GameFlowTest_ManagementScreensMidSeason_Test
Definition gui_view.h:197
void applyWindowSettings(bool resize=true)
Definition gui_view.cpp:640
GameController & getController() const
Gets the game controller.
Definition gui_view.cpp:570
bool history_step
Definition gui_view.h:236
SDL_Window * getWindow() const
Gets the SDL window.
Definition gui_view.cpp:568
void reportMatchRenderTimings()
Definition gui_view.cpp:412
void changeScene(std::unique_ptr< GUIScene > newScene)
Changes the current scene.
Definition gui_view.cpp:426
static constexpr float MATCH_PROFILE_FRAME_SECONDS
Definition gui_view.h:222
void applySavePolicy()
Definition gui_view.cpp:668
GameController & controller
Definition gui_view.h:210
bool running
Definition gui_view.h:213
void recordHistory()
Definition gui_view.cpp:464
bool rendererIsSoftware
Definition gui_view.h:223
bool captureScreenshot(std::string_view path) const
Definition gui_view.cpp:572
GUIScene * getSceneBelowTop() const
The scene popScene() would reveal (nullptr without overlays).
Definition gui_view.cpp:457
void markHistoryStep()
Marks the scene change just requested as a step through the history (Back / Forward),...
Definition gui_view.h:124
const NavHistory & navHistory() const
Definition gui_view.h:117
friend class GameFlowTest_GUIFlowLifecycle_Test
Definition gui_view.h:196
void handleEvents()
Definition gui_view.cpp:266
void refreshTheme()
Definition gui_view.cpp:638
Manages the core game logic, interacting with teams, leagues, and players.
Definition game_controller.h:70
Browser-style history of the screens visited in a career.
Definition nav_history.h:109
Definition runtime_editor_dialog.h:26
Recognises a two-finger sideways swipe from wheel samples.
Definition swipe_gesture.h:42
Definition editor_context.h:23