Player12
An open source football management simulator
Loading...
Searching...
No Matches
fixtures_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 <vector>
12
15
21{
22 public:
23 explicit FixturesScene(GUIView* parent);
24
25 void update(float deltaTime) override;
26 [[nodiscard]] SceneID getID() const override { return SceneID::FIXTURES; }
27
28 protected:
29 void renderContent() override;
30 [[nodiscard]] NavSection navSection() const override
31 {
33 }
34 void refresh() override;
35
36 private:
38
39 enum class View : uint8_t
40 {
41 CLUB,
42 LEAGUE
43 };
44
45 void renderClubSummary();
46 void renderClubFixtures(float height);
47 void renderLeagueRound();
48
51 std::vector<CompetitionView::FixtureRow> club_fixtures;
52 std::vector<CompetitionView::FixtureRow> league_fixtures;
53 int round_count = 0;
55 int wins = 0;
56 int draws = 0;
57 int losses = 0;
58 int goals_for = 0;
61 bool scroll_to_next = true;
62};
Fixtures and results: the managed club's season calendar and the league schedule round by round.
Definition fixtures_scene.h:21
NavSection navSection() const override
Sidebar entry highlighted for this screen.
Definition fixtures_scene.h:30
int goals_for
Definition fixtures_scene.h:58
std::vector< CompetitionView::FixtureRow > league_fixtures
Definition fixtures_scene.h:52
View
Definition fixtures_scene.h:40
bool scroll_to_next
Definition fixtures_scene.h:61
int losses
Definition fixtures_scene.h:57
void refresh() override
Rebuilds cached view models from the game state.
Definition fixtures_scene.cpp:69
void renderClubFixtures(float height)
Definition fixtures_scene.cpp:180
int wins
Definition fixtures_scene.h:55
TeamID club_id
Definition fixtures_scene.h:50
SceneID getID() const override
Gets the ID of the scene.
Definition fixtures_scene.h:26
int round_count
Definition fixtures_scene.h:53
int next_fixture_index
Definition fixtures_scene.h:60
View view
Definition fixtures_scene.h:49
void renderClubSummary()
Definition fixtures_scene.cpp:150
void update(float deltaTime) override
Updates scene logic.
Definition fixtures_scene.cpp:63
void renderLeagueRound()
Definition fixtures_scene.cpp:287
int goals_against
Definition fixtures_scene.h:59
int draws
Definition fixtures_scene.h:56
std::vector< CompetitionView::FixtureRow > club_fixtures
Definition fixtures_scene.h:51
int selected_round
Definition fixtures_scene.h:54
friend class GameFlowTest_GUIFlowLifecycle_Test
Definition fixtures_scene.h:37
void renderContent() override
Draws the page body inside the content region.
Definition fixtures_scene.cpp:123
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
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18