|
Player12
An open source football management simulator
|
Club hub: the base scene of a career. More...
#include <main_game_scene.h>
Classes | |
| struct | FinanceBar |
| struct | LedgerRow |
| struct | PlayedMatch |
Public Types | |
| enum class | Page { OVERVIEW , FINANCES } |
| Pages hosted directly by the club hub. More... | |
Public Member Functions | |
| MainGameScene (GUIView *guiView_ptr) | |
| Constructs a new MainGameScene. | |
| ~MainGameScene () override | |
| Destroys the MainGameScene. A holiday or off-season run still simulating stops at the end of its current day; a Continue to the next fixture finishes its days first. | |
| void | onEnter () override |
| Called when entering the scene. | |
| void | update (float deltaTime) override |
| Updates scene logic. | |
| SceneID | getID () const override |
| Gets the ID of this scene. | |
| bool | isAdvancing () const |
| True while days are being simulated in the background. | |
| bool | isContinuing () const |
| True from the Continue request until the days are simulated, including the frames spent closing the screens above the hub first. | |
| std::string | continueLabel () const |
| Label of the context-aware Continue / Play Match button. | |
| void | requestContinue () |
| Plays today's match, or returns to the hub and simulates days up to the next managed fixture. | |
| void | requestHoliday (const HolidayPlan &plan) |
| Returns to the hub and simulates days with the assistant in charge until the plan ends; the report opens when it is done. | |
| void | requestPostMatchAdvance (const GameDateValue &date, TeamID home_id, TeamID away_id) |
| After a managed match has been recorded: returns to the hub and simulates the rest of the day on the Continue worker, then opens the match's report. | |
| void | renderContinueOverlay () |
| Draws the Continue progress card over a dimmed snapshot of the screen. Reads only the controller's thread-safe progress, never game state, because days are being simulated on a worker thread. | |
| float | continueFadeOut () const |
| Opacity of the dimming that fades out after Continue ends. | |
| void | refreshIfStale () |
| Rebuilds the cached career data when the date moved on or the cached next fixture has been played elsewhere (e.g. a quick result). | |
| void | showPage (Page page) |
| Switches the page shown by the hub. | |
| void | offerWelcome () |
| Shows the welcome tour over Home next frame (a career just started from the club choice, or a replay asked for on Help). | |
| void | requestStop () |
| Asks the running Continue or holiday to stop at the end of the day being simulated (the Stop button of the progress card). | |
| bool | isShowingSeasonReview () const |
| True while the end-of-season summary is open. | |
| const WelcomeTour & | welcomeTour () const |
| The welcome tour (open while it is shown). | |
Public Member Functions inherited from ManagementScene | |
| ManagementScene (GUIView *guiViewPtr) | |
| void | render () final |
| Renders the scene. | |
| void | onEnter () override |
| Called when the scene is entered/becomes active. | |
| void | onResume () override |
| 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. | |
| void | handleEvent (const SDL_Event &event) override |
| std::optional< NavEntry > | historyEntry () const override |
Public Member Functions inherited from GUIScene | |
| GUIScene (GUIView *guiView_ptr) | |
| Constructs a new GUIScene. | |
| virtual | ~GUIScene ()=default |
| Destroys the GUIScene. | |
| virtual void | onExit () |
| Called when the scene is exited/becomes inactive. | |
| virtual void | onResize (int width, int height) |
| Called when the window is resized. | |
Protected Member Functions | |
| void | renderContent () override |
| Draws the page body inside the content region. | |
| NavSection | navSection () const override |
| Sidebar entry highlighted for this screen. | |
| void | refresh () override |
| Rebuilds cached view models from the game state. | |
Protected Member Functions inherited from ManagementScene | |
| virtual std::optional< EditorContext > | editorContext () const |
| void | showToast (std::string message, bool isError=false) |
| Shows a short confirmation message in the top bar. | |
| HolidayDialog & | holidayDialog () |
| Holiday planner and return report of this screen. | |
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. | |
Private Member Functions | |
| void | renderOverview () |
| void | renderFinances () |
| void | renderNextMatchCard (float width, float height) |
| void | renderStandingsCard (float width, float height) |
| void | renderRecentResultsCard (float width, float height) |
| void | renderKeyPlayersCard (float width, float height) |
| void | startContinuation () |
| void | autoFixLineup () |
| bool | lineupBlocked () const |
| void | refreshData () |
| void | showPendingSeasonReview () |
| void | renderSeasonReview () |
| void | trackContinueProgress () |
Friends | |
| class | GameFlowTest_GUIFlowLifecycle_Test |
Additional Inherited Members | |
Protected Attributes inherited from GUIScene | |
| GUIView * | guiView |
Club hub: the base scene of a career.
Hosts the Home dashboard and the Finances page, and owns the career clock (Continue / Play Match). Other management screens are opened above it and drive the clock through requestContinue().
|
strong |
|
explicit |
Constructs a new MainGameScene.
| guiView_ptr | Pointer to the GUIView. |
|
override |
Destroys the MainGameScene. A holiday or off-season run still simulating stops at the end of its current day; a Continue to the next fixture finishes its days first.
|
private |
| float MainGameScene::continueFadeOut | ( | ) | const |
Opacity of the dimming that fades out after Continue ends.
| std::string MainGameScene::continueLabel | ( | ) | const |
Label of the context-aware Continue / Play Match button.
|
overridevirtual |
|
inline |
True while days are being simulated in the background.
|
inline |
True from the Continue request until the days are simulated, including the frames spent closing the screens above the hub first.
|
inline |
True while the end-of-season summary is open.
|
inlineprivate |
The next fixture's selection has unavailable players the assistant could still replace (players nobody fit can replace play through it).
|
overrideprotectedvirtual |
Sidebar entry highlighted for this screen.
Implements ManagementScene.
|
inline |
Shows the welcome tour over Home next frame (a career just started from the club choice, or a replay asked for on Help).
|
overridevirtual |
Called when entering the scene.
Reimplemented from GUIScene.
|
inlineoverrideprotectedvirtual |
Rebuilds cached view models from the game state.
Reimplemented from ManagementScene.
|
private |
| void MainGameScene::refreshIfStale | ( | ) |
Rebuilds the cached career data when the date moved on or the cached next fixture has been played elsewhere (e.g. a quick result).
|
overrideprotectedvirtual |
Draws the page body inside the content region.
Implements ManagementScene.
| void MainGameScene::renderContinueOverlay | ( | ) |
Draws the Continue progress card over a dimmed snapshot of the screen. Reads only the controller's thread-safe progress, never game state, because days are being simulated on a worker thread.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void MainGameScene::requestContinue | ( | ) |
Plays today's match, or returns to the hub and simulates days up to the next managed fixture.
| void MainGameScene::requestHoliday | ( | const HolidayPlan & | plan | ) |
Returns to the hub and simulates days with the assistant in charge until the plan ends; the report opens when it is done.
| void MainGameScene::requestPostMatchAdvance | ( | const GameDateValue & | date, |
| TeamID | home_id, | ||
| TeamID | away_id | ||
| ) |
After a managed match has been recorded: returns to the hub and simulates the rest of the day on the Continue worker, then opens the match's report.
| void MainGameScene::requestStop | ( | ) |
Asks the running Continue or holiday to stop at the end of the day being simulated (the Stop button of the progress card).
|
inline |
Switches the page shown by the hub.
|
private |
Opens the season summary once nothing else is in the way.
|
private |
|
private |
|
overridevirtual |
|
inline |
The welcome tour (open while it is shown).
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
Auto-fix would change nothing (see GameController::canKickOff).
|
private |
Club the cached page shows (0: none).
|
private |
|
private |
|
private |
|
private |
Newest first.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Transfer money available today and the board's embargo.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Controller of the running worker (stopped from the destructor).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Checklist and next steps card on Home.
|
private |
|
private |
|
private |
Runs that closing the game interrupts (holiday, off-season, out of work); a Continue to the next fixture completes its days.
|
private |
|
private |
|
private |