Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_touchline.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 <string>
14
15#include "global/types.h"
17
18class GameController;
19class Lineup;
20class MatchEngine;
21
39
41namespace Touchline
42{
49bool beginDialog(const char* title, bool& opened, float width, float height);
50
52float footerHeight();
53
55void pauseSetting();
56
58bool pausesMatch();
59
61std::string refusalText(MatchChanges::Refusal refusal,
62 const MatchEngine& engine, const std::string& outName,
63 const std::string& inName);
64
66std::string playerName(const Lineup& lineup, PlayerID player);
67
69ImVec4 conditionColor(float condition);
70} // namespace Touchline
Manages the core game logic, interacting with teams, leagues, and players.
Definition game_controller.h:70
Manages the starting XI and reserves of a team.
Definition lineup.h:85
Definition match_engine.h:517
Refusal
Why a change cannot be made (NONE when it can).
Definition match_changes.h:38
Shared frame and wording of the substitutions and tactics dialogs.
Definition match_touchline.cpp:23
bool beginDialog(const char *title, bool &opened, float width, float height)
Opens (once) and begins a centred modal sized to the window: at most width x height unscaled pixels a...
Definition match_touchline.cpp:32
void pauseSetting()
"Pause the match while this is open" (a saved setting).
Definition match_touchline.cpp:69
bool pausesMatch()
Whether the match pauses while a matchday dialog is open.
Definition match_touchline.cpp:78
ImVec4 conditionColor(float condition)
Condition bar colour (fresh, tiring, exhausted).
Definition match_touchline.cpp:119
std::string playerName(const Lineup &lineup, PlayerID player)
Name of a player of the matchday squad (empty when unknown).
Definition match_touchline.cpp:110
std::string refusalText(MatchChanges::Refusal refusal, const MatchEngine &engine, const std::string &outName, const std::string &inName)
Why a change is refused, with the players' names where useful.
Definition match_touchline.cpp:83
float footerHeight()
Height to keep free under a dialog body for the button row.
Definition match_touchline.cpp:62
What the matchday dialogs act on: the live engine and the managed side, plus the match HUD's status l...
Definition match_touchline.h:27
bool & status_refused
Definition match_touchline.h:37
std::string & status
Definition match_touchline.h:36
ImU32 kit
Definition match_touchline.h:34
MatchEngine & engine
Definition match_touchline.h:29
GameController & controller
Definition match_touchline.h:28
bool home
Definition match_touchline.h:31
TeamID team_id
Definition match_touchline.h:32
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18
uint32_t PlayerID
Type alias for Player identifiers.
Definition types.h:21