93 virtual void update(
float deltaTime) = 0;
124 virtual void onResize(
int width,
int height);
169 void changeScene(std::unique_ptr<GUIScene> newScene);
Base class for all GUI scenes.
Definition gui_scene.h:68
SDL_Window * getWindow() const
Gets the SDL window.
Definition gui_scene.cpp:45
virtual void handleEvent(const SDL_Event &event)
Handles SDL events for the scene.
Definition gui_scene.cpp:30
SDL_Renderer * getRenderer() const
Gets the SDL renderer.
Definition gui_scene.cpp:40
virtual void onResume()
Called when an overlay above this scene closes and it becomes the active scene again....
Definition gui_scene.cpp:25
virtual void render()=0
Renders the scene.
void quit()
Requests the application to quit.
Definition gui_scene.cpp:58
virtual std::optional< NavEntry > historyEntry() const
How to open this screen again from the navigation history, or nothing for scenes outside it (menus,...
Definition gui_scene.h:139
void changeScene(std::unique_ptr< GUIScene > newScene)
Requests a scene change.
Definition gui_scene.cpp:50
virtual void onResize(int width, int height)
Called when the window is resized.
Definition gui_scene.cpp:35
GUIView * getGuiView() const
Gets the associated GUIView.
Definition gui_scene.h:163
virtual void update(float deltaTime)=0
Updates scene logic.
virtual ~GUIScene()=default
Destroys the GUIScene.
virtual SceneID getID() const =0
Gets the ID of the scene.
virtual void onEnter()
Called when the scene is entered/becomes active.
Definition gui_scene.cpp:15
GUIView * guiView
Definition gui_scene.h:176
virtual void onExit()
Called when the scene is exited/becomes inactive.
Definition gui_scene.cpp:20
Main view manager for the GUI. Handles scenes and overlays.
Definition gui_view.h:29
SceneID
Identifiers for different GUI scenes.
Definition gui_scene.h:24