15#include <unordered_set>
68 void update(
float deltaTime)
override;
Main view manager for the GUI. Handles scenes and overlays.
Definition gui_view.h:29
Manages the core game logic, interacting with teams, leagues, and players.
Definition game_controller.h:70
Club hub: the base scene of a career.
Definition main_game_scene.h:37
SeasonReviewDialog season_review_dialog
Definition main_game_scene.h:182
NextStepsCard next_steps
Definition main_game_scene.h:261
std::future< int > continue_operation
Definition main_game_scene.h:189
~MainGameScene() override
Destroys the MainGameScene. A holiday or off-season run still simulating stops at the end of its curr...
Definition main_game_scene.cpp:77
void renderContinueOverlay()
Draws the Continue progress card over a dimmed snapshot of the screen. Reads only the controller's th...
Definition main_game_scene.cpp:342
bool stop_requested
Definition main_game_scene.h:197
void onEnter() override
Called when entering the scene.
Definition main_game_scene.cpp:114
int continue_logged_day
Definition main_game_scene.h:213
double continue_started_at
Definition main_game_scene.h:216
bool continue_overlay_shown
Definition main_game_scene.h:218
uint32_t continue_day_matches
Definition main_game_scene.h:214
Page active_page
Definition main_game_scene.h:176
int cached_season
Definition main_game_scene.h:185
void trackContinueProgress()
Definition main_game_scene.cpp:318
Page
Pages hosted directly by the club hub.
Definition main_game_scene.h:41
size_t cached_unavailable_starters
Definition main_game_scene.h:225
GameDateValue continue_start_date
Definition main_game_scene.h:211
std::jthread continue_worker
Definition main_game_scene.h:188
double continue_finished_at
Definition main_game_scene.h:217
GameController * continue_controller
Definition main_game_scene.h:199
bool cached_can_kick_off
Definition main_game_scene.h:227
std::vector< float > cached_balance_trend
Definition main_game_scene.h:257
std::unordered_set< PlayerID > cached_unavailable
Definition main_game_scene.h:223
void requestHoliday(const HolidayPlan &plan)
Returns to the hub and simulates days with the assistant in charge until the plan ends; the report op...
Definition main_game_scene.cpp:245
float budget_shift
Definition main_game_scene.h:258
std::optional< PlayedMatch > match_report
Definition main_game_scene.h:207
void autoFixLineup()
Definition main_game_scene.cpp:444
bool stop_on_close
Definition main_game_scene.h:196
std::optional< HolidayPlan > pending_holiday
Definition main_game_scene.h:192
void renderNextMatchCard(float width, float height)
Definition main_game_scene.cpp:593
void showPage(Page page)
Switches the page shown by the hub.
Definition main_game_scene.h:128
bool holiday_running
Definition main_game_scene.h:193
void renderRecentResultsCard(float width, float height)
Definition main_game_scene.cpp:777
float continueFadeOut() const
Opacity of the dimming that fades out after Continue ends.
Definition main_game_scene.cpp:434
void renderKeyPlayersCard(float width, float height)
Definition main_game_scene.cpp:828
GameController::ContinueProgress continue_progress
Definition main_game_scene.h:212
void update(float deltaTime) override
Updates scene logic.
Definition main_game_scene.cpp:124
void renderOverview()
Definition main_game_scene.cpp:492
std::vector< LedgerRow > cached_ledger
Definition main_game_scene.h:256
TeamID cached_club
Definition main_game_scene.h:187
std::vector< std::reference_wrapper< const Player > > cached_top_players
Definition main_game_scene.h:184
WelcomeTour welcome_tour
Definition main_game_scene.h:177
std::string continueLabel() const
Label of the context-aware Continue / Play Match button.
Definition main_game_scene.cpp:213
float cached_average_overall
Definition main_game_scene.h:236
void refreshData()
Definition main_game_scene.cpp:1044
SceneID getID() const override
Gets the ID of this scene.
Definition main_game_scene.cpp:71
CompetitionView::Zones cached_zones
Definition main_game_scene.h:222
void renderSeasonReview()
Definition main_game_scene.cpp:486
bool welcome_requested
Definition main_game_scene.h:178
void renderFinances()
Definition main_game_scene.cpp:861
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 ...
Definition main_game_scene.cpp:256
bool continuation_running
Definition main_game_scene.h:190
void startContinuation()
Definition main_game_scene.cpp:267
void refresh() override
Rebuilds cached view models from the game state.
Definition main_game_scene.h:154
bool isAdvancing() const
True while days are being simulated in the background.
Definition main_game_scene.h:77
bool cached_embargo
Definition main_game_scene.h:235
std::vector< PlayerView::PlayerRow > cached_squad
Definition main_game_scene.h:230
std::vector< std::string > continue_log
Definition main_game_scene.h:215
bool isContinuing() const
True from the Continue request until the days are simulated, including the frames spent closing the s...
Definition main_game_scene.h:83
bool lineupBlocked() const
Definition main_game_scene.h:169
std::optional< CompetitionView::FixtureRow > cached_next
Definition main_game_scene.h:229
void renderStandingsCard(float width, float height)
Definition main_game_scene.cpp:716
std::vector< FinanceBar > cached_finance_bars
Definition main_game_scene.h:253
bool finance_show_month
Definition main_game_scene.h:255
bool isShowingSeasonReview() const
True while the end-of-season summary is open.
Definition main_game_scene.h:143
std::vector< FinanceBar > cached_month_bars
Definition main_game_scene.h:254
NavSection navSection() const override
Sidebar entry highlighted for this screen.
Definition main_game_scene.cpp:108
int64_t cached_transfer_budget
Definition main_game_scene.h:234
std::vector< std::pair< int, int > > cached_standings
Definition main_game_scene.h:183
void showPendingSeasonReview()
Definition main_game_scene.cpp:94
void offerWelcome()
Shows the welcome tour over Home next frame (a career just started from the club choice,...
Definition main_game_scene.h:134
FinanceSummary cached_season_summary
Definition main_game_scene.h:252
int64_t cached_payroll
Definition main_game_scene.h:231
void renderContent() override
Draws the page body inside the content region.
Definition main_game_scene.cpp:458
const WelcomeTour & welcomeTour() const
The welcome tour (open while it is shown).
Definition main_game_scene.h:149
void refreshIfStale()
Rebuilds the cached career data when the date moved on or the cached next fixture has been played els...
Definition main_game_scene.cpp:192
bool continuation_requested
Definition main_game_scene.h:191
void requestContinue()
Plays today's match, or returns to the hub and simulates days up to the next managed fixture.
Definition main_game_scene.cpp:226
std::vector< CompetitionView::StandingRow > cached_table
Definition main_game_scene.h:221
friend class GameFlowTest_GUIFlowLifecycle_Test
Definition main_game_scene.h:157
int64_t cached_squad_value
Definition main_game_scene.h:232
std::vector< CompetitionView::FixtureRow > cached_recent
Definition main_game_scene.h:228
size_t cached_starters
Definition main_game_scene.h:224
void requestStop()
Asks the running Continue or holiday to stop at the end of the day being simulated (the Stop button o...
Definition main_game_scene.cpp:87
GameDateValue cached_date
Definition main_game_scene.h:186
Base class for every in-career screen.
Definition management_scene.h:93
Home card: first-week checklist (while visible) and the top next steps with their reasons and a butto...
Definition onboarding_overlay.h:66
The end-of-season summary, shown once when a season ends: the final position and its consequence (tit...
Definition season_review_dialog.h:29
bool isOpen() const
Definition season_review_dialog.h:38
Short welcome tour of a new career: the club, what the board expects, the next thing to do and how Co...
Definition welcome_tour.h:27
SceneID
Identifiers for different GUI scenes.
Definition gui_scene.h:24
NavSection
Screens of the management shell. The sidebar groups them into a few hubs (Home, Inbox,...
Definition nav_history.h:26
Number of promotion and relegation places in a league table.
Definition competition_view.h:70
Per-category totals of a ledger range.
Definition finances.h:67
Definition game_controller.h:307
Represents a specific date in the game world.
Definition gamedate.h:20
A holiday request.
Definition holiday.h:67
Definition main_game_scene.h:240
int64_t amount
Definition main_game_scene.h:242
const char * label_key
Definition main_game_scene.h:241
std::string amount_text
Definition main_game_scene.h:243
Definition main_game_scene.h:246
std::string amount_text
Definition main_game_scene.h:250
std::string date
Definition main_game_scene.h:247
const char * category_key
Definition main_game_scene.h:248
int64_t amount
Definition main_game_scene.h:249
Definition main_game_scene.h:202
TeamID away_id
Definition main_game_scene.h:205
GameDateValue date
Definition main_game_scene.h:203
TeamID home_id
Definition main_game_scene.h:204
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18