Player12
An open source football management simulator
Loading...
Searching...
No Matches
callup_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
17
25{
26 public:
27 explicit CallUpScene(GUIView* parent);
28
29 void update(float deltaTime) override;
30 [[nodiscard]] SceneID getID() const override { return SceneID::CALL_UPS; }
31
32 protected:
33 void renderContent() override;
34 [[nodiscard]] NavSection navSection() const override
35 {
37 }
38 void refresh() override;
39
40 private:
42
44 struct Row
45 {
47 std::string role;
48 std::string club;
49 std::string form;
50 std::string caps;
51 int group = 0;
52 };
53
55 {
56 std::string date;
57 std::string opponent;
58 std::string competition;
59 };
60
61 void renderTiles() const;
62 void renderSquad(float width);
63 void renderCandidates(float width);
64 void renderFixtures(float width) const;
65 void renderTable(const char* id, const std::vector<const Row*>& rows,
66 bool squad);
67 void renderDetail(const Row& row, bool squad);
68 void rebuildLists();
69 void confirm();
70
72 std::vector<Row> rows;
74 std::vector<PlayerID> working;
75 std::vector<const Row*> squad_rows;
76 std::vector<const Row*> candidate_rows;
77 std::vector<FixtureLine> fixtures;
78 std::string subtitle;
79 std::string status_value;
80 std::string status_note;
81 std::string squad_value;
82 std::string keepers_value;
83 std::string squad_title;
86 int filter = 0;
87 size_t keepers = 0;
88 bool dirty = false;
89 bool lists_stale = false;
90 bool confirm_requested = false;
91};
National-team call-ups of the head coach: the announced squad of the coming window (editable until th...
Definition callup_scene.h:25
std::string status_note
Definition callup_scene.h:80
int filter
Definition callup_scene.h:86
size_t keepers
Definition callup_scene.h:87
std::vector< PlayerID > working
Definition callup_scene.h:74
void renderTable(const char *id, const std::vector< const Row * > &rows, bool squad)
Definition callup_scene.cpp:348
std::string squad_value
Definition callup_scene.h:81
void renderFixtures(float width) const
Definition callup_scene.cpp:327
PlayerID selected
Definition callup_scene.h:85
SceneID getID() const override
Gets the ID of the scene.
Definition callup_scene.h:30
GameController::CallUpView view
Definition callup_scene.h:71
std::string subtitle
Definition callup_scene.h:78
std::vector< const Row * > squad_rows
Definition callup_scene.h:75
NavSection navSection() const override
Sidebar entry highlighted for this screen.
Definition callup_scene.h:34
void confirm()
Definition callup_scene.cpp:502
void renderSquad(float width)
Definition callup_scene.cpp:273
bool dirty
Definition callup_scene.h:88
std::vector< FixtureLine > fixtures
Definition callup_scene.h:77
bool confirm_requested
Definition callup_scene.h:90
void rebuildLists()
Definition callup_scene.cpp:161
void renderTiles() const
Definition callup_scene.cpp:239
std::vector< const Row * > candidate_rows
Definition callup_scene.h:76
std::string squad_title
Definition callup_scene.h:83
void renderContent() override
Draws the page body inside the content region.
Definition callup_scene.cpp:187
std::vector< Row > rows
Definition callup_scene.h:72
void renderDetail(const Row &row, bool squad)
Definition callup_scene.cpp:442
void renderCandidates(float width)
Definition callup_scene.cpp:304
void refresh() override
Rebuilds cached view models from the game state.
Definition callup_scene.cpp:99
void update(float deltaTime) override
Updates scene logic.
Definition callup_scene.cpp:93
bool lists_stale
Definition callup_scene.h:89
std::string status_value
Definition callup_scene.h:79
GameDateValue cached_date
Definition callup_scene.h:84
friend class GameFlowTest_GUIFlowLifecycle_Test
Definition callup_scene.h:41
std::string keepers_value
Definition callup_scene.h:82
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
Definition callup_scene.h:55
std::string opponent
Definition callup_scene.h:57
std::string date
Definition callup_scene.h:56
std::string competition
Definition callup_scene.h:58
One player line, pre-formatted at refresh time.
Definition callup_scene.h:45
std::string club
Definition callup_scene.h:48
GameController::CallUpCandidate candidate
Definition callup_scene.h:46
int group
Definition callup_scene.h:51
std::string form
Definition callup_scene.h:49
std::string caps
Definition callup_scene.h:50
std::string role
Definition callup_scene.h:47
Definition game_controller.h:1219
Definition game_controller.h:1235
Represents a specific date in the game world.
Definition gamedate.h:20
uint32_t PlayerID
Type alias for Player identifiers.
Definition types.h:21