Player12
An open source football management simulator
Loading...
Searching...
No Matches
season_review_dialog.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 <imgui.h>
12
13#include <cstdint>
14#include <optional>
15#include <string>
16#include <utility>
17#include <vector>
18
19class GameController;
20struct SeasonReview;
21
29{
30 public:
32 void open(const GameController& controller, const SeasonReview& review);
33
35 std::optional<std::uint16_t> render();
36
38 [[nodiscard]] bool isOpen() const { return open_requested || visible; }
39
40 private:
41 struct Line
42 {
43 std::string label;
44 std::string value;
45 ImVec4 color;
46 };
47
48 bool open_requested = false;
49 bool visible = false;
50 std::uint16_t season = 0;
51
52 // Formatted once in open().
53 std::string headline;
55 std::string subtitle;
56 std::vector<std::pair<std::string, std::string>> tiles;
57 std::vector<std::string> highlights;
58 std::string verdict;
59 ImVec4 verdict_color{};
60 std::string confidence;
61 std::vector<Line> grades;
62 std::vector<std::pair<std::string, std::string>> money;
63 std::vector<std::pair<std::string, std::string>> next_objectives;
64 std::string farewell;
65};
Manages the core game logic, interacting with teams, leagues, and players.
Definition game_controller.h:70
The end-of-season summary, shown once when a season ends: the final position and its consequence (tit...
Definition season_review_dialog.h:29
std::vector< std::pair< std::string, std::string > > next_objectives
Definition season_review_dialog.h:63
std::optional< std::uint16_t > render()
Definition season_review_dialog.cpp:203
ImVec4 headline_color
Definition season_review_dialog.h:54
std::uint16_t season
Definition season_review_dialog.h:50
std::vector< std::pair< std::string, std::string > > money
Definition season_review_dialog.h:62
void open(const GameController &controller, const SeasonReview &review)
Definition season_review_dialog.cpp:65
ImVec4 verdict_color
Definition season_review_dialog.h:59
std::string verdict
Definition season_review_dialog.h:58
std::string subtitle
Definition season_review_dialog.h:55
std::vector< Line > grades
Definition season_review_dialog.h:61
std::vector< std::string > highlights
Definition season_review_dialog.h:57
bool isOpen() const
Definition season_review_dialog.h:38
bool visible
Definition season_review_dialog.h:49
std::string farewell
Definition season_review_dialog.h:64
std::string headline
Definition season_review_dialog.h:53
std::string confidence
Definition season_review_dialog.h:60
std::vector< std::pair< std::string, std::string > > tiles
Definition season_review_dialog.h:56
bool open_requested
Definition season_review_dialog.h:48
Definition season_review_dialog.h:42
std::string value
Definition season_review_dialog.h:44
ImVec4 color
Definition season_review_dialog.h:45
std::string label
Definition season_review_dialog.h:43
The managed club's season as the end-of-season summary shows it (persisted once per season).
Definition season_review.h:79