Player12
An open source football management simulator
Loading...
Searching...
No Matches
club_scene.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <cstdint>
12#include <optional>
13#include <string>
14#include <vector>
15
18
24{
25 public:
26 explicit ClubScene(GUIView* parent);
27
28 void update(float deltaTime) override;
29 [[nodiscard]] SceneID getID() const override { return SceneID::CLUB; }
30
31 protected:
32 void renderContent() override;
33 [[nodiscard]] NavSection navSection() const override
34 {
35 return NavSection::CLUB;
36 }
37 void refresh() override;
38
39 private:
41
44 {
45 std::string season;
46 std::string competition;
47 std::string champion;
48 std::string runner_up;
49 std::string top_scorer;
50 std::string movements;
51 };
52
53 void renderBoard(float width);
55 float keyWidth) const;
56 void renderStadium(float width);
57 void renderSupporters(float width);
58 void renderHistory() const;
59
62 {
63 std::string text;
64 float points = 0.0f;
65 };
66
67 std::vector<HistoryRow> history;
68 std::optional<GameController::BoardTargets> board_targets;
69 std::vector<float> confidence_trend;
72 uint32_t fair_ticket_price = 0;
73 uint32_t last_attendance = 0;
75 std::optional<float> supporters_index;
76 std::vector<SupporterLine> supporter_reasons;
77};
Club overview: board objective and confidence, stadium and ticket pricing, facilities and the competi...
Definition club_scene.h:24
void renderContent() override
Draws the page body inside the content region.
Definition club_scene.cpp:198
std::vector< HistoryRow > history
Definition club_scene.h:67
void update(float deltaTime) override
Updates scene logic.
Definition club_scene.cpp:76
int ticket_price_input
Definition club_scene.h:71
void renderHistory() const
Definition club_scene.cpp:452
std::optional< GameController::BoardTargets > board_targets
Definition club_scene.h:68
std::optional< float > supporters_index
Definition club_scene.h:75
std::vector< float > confidence_trend
Definition club_scene.h:69
SceneID getID() const override
Gets the ID of the scene.
Definition club_scene.h:29
void renderStadium(float width)
Definition club_scene.cpp:397
int league_position
Definition club_scene.h:70
void renderTargets(const GameController::BoardTargets &targets, float keyWidth) const
Definition club_scene.cpp:325
uint32_t fair_ticket_price
Definition club_scene.h:72
void refresh() override
Rebuilds cached view models from the game state.
Definition club_scene.cpp:82
void renderBoard(float width)
Definition club_scene.cpp:266
NavSection navSection() const override
Sidebar entry highlighted for this screen.
Definition club_scene.h:33
uint32_t last_attendance
Definition club_scene.h:73
std::vector< SupporterLine > supporter_reasons
Definition club_scene.h:76
void renderSupporters(float width)
Definition club_scene.cpp:357
friend class GameFlowTest_GUIFlowLifecycle_Test
Definition club_scene.h:40
Main view manager for the GUI. Handles scenes and overlays.
Definition gui_view.h:29
Base class for every in-career screen.
Definition management_scene.h:93
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
One formatted roll-of-honour line.
Definition club_scene.h:44
std::string movements
Definition club_scene.h:50
std::string runner_up
Definition club_scene.h:48
std::string top_scorer
Definition club_scene.h:49
std::string competition
Definition club_scene.h:46
std::string season
Definition club_scene.h:45
std::string champion
Definition club_scene.h:47
One reason behind the supporters' mood, localised.
Definition club_scene.h:62
float points
Definition club_scene.h:64
std::string text
Definition club_scene.h:63
The board's targets this season and how they are going.
Definition game_controller.h:741