Player12
An open source football management simulator
Loading...
Searching...
No Matches
awards_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 <string>
13#include <vector>
14
16
22{
23 public:
24 explicit AwardsScene(GUIView* parent);
25
26 void update(float /*deltaTime*/) override
27 {
28 // Rendering reads current state; there is no per-frame update work.
29 }
30 [[nodiscard]] SceneID getID() const override { return SceneID::AWARDS; }
31
32 protected:
33 void renderContent() override;
34 [[nodiscard]] NavSection navSection() const override
35 {
36 return NavSection::AWARDS;
37 }
38 void refresh() override;
39
40 private:
42
44 struct Winner
45 {
46 std::string award;
48 std::string name;
49 std::string club;
50 std::string figure;
51 };
52
62
64 struct RaceRow
65 {
67 std::string name;
68 std::string club;
69 std::string rating;
70 std::string contribution;
71 bool qualified = false;
72 };
73
74 void renderSelectors();
75 void renderRace(float width);
76 void renderSeason(float width);
77 void renderTeamOfSeason(float width);
78 void renderMonths();
79 void renderWinner(const Winner& winner, float width);
80
82 uint16_t season_year = 0;
83 std::vector<uint16_t> seasons;
84 bool current_season = true;
85 std::vector<Winner> season_winners;
86 std::vector<Winner> team_of_season;
87 std::vector<MonthRow> months;
88 std::vector<RaceRow> race;
89 std::vector<RaceRow> young_race;
90};
League honours: the running award race, the season awards and the Team of the Season,...
Definition awards_scene.h:22
std::vector< Winner > season_winners
Definition awards_scene.h:85
std::vector< uint16_t > seasons
Definition awards_scene.h:83
LeagueID league_id
Definition awards_scene.h:81
void renderWinner(const Winner &winner, float width)
Definition awards_scene.cpp:278
uint16_t season_year
Definition awards_scene.h:82
void renderContent() override
Draws the page body inside the content region.
Definition awards_scene.cpp:204
void renderRace(float width)
Definition awards_scene.cpp:296
void renderMonths()
Definition awards_scene.cpp:407
std::vector< RaceRow > young_race
Definition awards_scene.h:89
void renderTeamOfSeason(float width)
Definition awards_scene.cpp:387
SceneID getID() const override
Gets the ID of the scene.
Definition awards_scene.h:30
void renderSelectors()
Definition awards_scene.cpp:231
std::vector< Winner > team_of_season
Definition awards_scene.h:86
std::vector< RaceRow > race
Definition awards_scene.h:88
NavSection navSection() const override
Sidebar entry highlighted for this screen.
Definition awards_scene.h:34
void refresh() override
Rebuilds cached view models from the game state.
Definition awards_scene.cpp:102
void update(float) override
Updates scene logic.
Definition awards_scene.h:26
void renderSeason(float width)
Definition awards_scene.cpp:366
bool current_season
Definition awards_scene.h:84
friend class GameFlowTest_GUIFlowLifecycle_Test
Definition awards_scene.h:41
std::vector< MonthRow > months
Definition awards_scene.h:87
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 month of the monthly awards table.
Definition awards_scene.h:55
Winner goal
Definition awards_scene.h:60
Winner young
Definition awards_scene.h:58
Winner manager
Definition awards_scene.h:59
Winner player
Definition awards_scene.h:57
std::string month
Definition awards_scene.h:56
One line of the award race.
Definition awards_scene.h:65
std::string rating
Definition awards_scene.h:69
PlayerID player_id
Definition awards_scene.h:66
std::string name
Definition awards_scene.h:67
std::string club
Definition awards_scene.h:68
std::string contribution
Definition awards_scene.h:70
bool qualified
Definition awards_scene.h:71
A winner line: who, for whom and the figure.
Definition awards_scene.h:45
std::string name
Definition awards_scene.h:48
std::string club
Definition awards_scene.h:49
std::string award
Definition awards_scene.h:46
std::string figure
Definition awards_scene.h:50
PlayerID player_id
Definition awards_scene.h:47
uint8_t LeagueID
Type alias for League identifiers.
Definition types.h:15
uint32_t PlayerID
Type alias for Player identifiers.
Definition types.h:21