|
Player12
An open source football management simulator
|
Base class for all GUI scenes. More...
#include <gui_scene.h>
Public Member Functions | |
| 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 | update (float deltaTime)=0 |
| Updates scene logic. | |
| virtual void | render ()=0 |
| Renders the scene. | |
| virtual void | onEnter () |
| Called when the scene is entered/becomes active. | |
| 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 SceneID | getID () const =0 |
| Gets the ID of the scene. | |
| 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). | |
Protected Member Functions | |
| 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 | |
| GUIView * | guiView |
Base class for all GUI scenes.
|
explicit |
|
virtualdefault |
Destroys the GUIScene.
|
protected |
Requests a scene change.
| newScene | The new scene to transition to. |
|
inlineprotected |
|
pure virtual |
Gets the ID of the scene.
GUIView uses this identifier to apply match-specific event and scene behavior.
Implemented in AboutScene, AwardsScene, CalendarScene, CallUpScene, ClubScene, DataHubScene, DelegationScene, FixturesScene, HelpScene, InboxScene, InternationalScene, LineupScene, MainGameScene, MainMenuScene, ManagerScene, MatchReportScene, MatchScene, MedicalScene, NewsScene, OppositionScene, PlayerCompareScene, PlayerProfileScene, PreseasonScene, RecordsScene, ReservesScene, RosterScene, ScoutingScene, SettingsScene, SquadPlannerScene, StaffScene, StandingsScene, StrategyScene, TeamSelectionScene, TimelineScene, TrainingScene, TransferMarketScene, and YouthScene.
|
protected |
Gets the SDL renderer.
|
protected |
Gets the SDL window.
|
virtual |
Handles SDL events for the scene.
| event | The SDL event to process. |
Reimplemented in ManagementScene, and MatchScene.
|
inlinevirtual |
How to open this screen again from the navigation history, or nothing for scenes outside it (menus, team selection, the live match).
Reimplemented in ManagementScene, MatchReportScene, PlayerCompareScene, PlayerProfileScene, and RosterScene.
|
virtual |
Called when the scene is entered/becomes active.
Reimplemented in AboutScene, HelpScene, MainGameScene, MainMenuScene, ManagementScene, MatchScene, SettingsScene, and TeamSelectionScene.
|
virtual |
Called when the scene is exited/becomes inactive.
Reimplemented in MatchScene.
|
virtual |
Called when the window is resized.
| width | The new window width. |
| height | The new window height. |
|
virtual |
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.
Reimplemented in ManagementScene, and TransferMarketScene.
|
protected |
Requests the application to quit.
|
pure virtual |
Renders the scene.
Implemented in ManagementScene, AboutScene, HelpScene, MainMenuScene, MatchScene, SettingsScene, and TeamSelectionScene.
|
pure virtual |
Updates scene logic.
| deltaTime | The time elapsed since the last update. |
Implemented in CalendarScene, CallUpScene, ClubScene, FixturesScene, InboxScene, InternationalScene, LineupScene, MainGameScene, MainMenuScene, ManagerScene, MatchReportScene, MatchScene, MedicalScene, PlayerCompareScene, PlayerProfileScene, ReservesScene, RosterScene, ScoutingScene, SettingsScene, SquadPlannerScene, StaffScene, StandingsScene, StrategyScene, TeamSelectionScene, TrainingScene, TransferMarketScene, YouthScene, AboutScene, AwardsScene, DataHubScene, DelegationScene, HelpScene, NewsScene, OppositionScene, PreseasonScene, RecordsScene, and TimelineScene.
|
protected |