Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_touchline.cpp File Reference
#include "match_touchline.h"
#include <fmt/printf.h>
#include <algorithm>
#include "global/language_manager.h"
#include "gui/widgets/theme.h"
#include "gui/widgets/widgets.h"
#include "model/lineup.h"
#include "model/match_engine.h"
#include "model/settings_manager.h"

Namespaces

namespace  Touchline
 Shared frame and wording of the substitutions and tactics dialogs.
 

Functions

bool Touchline::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 and 94% of the work area.
 
float Touchline::footerHeight ()
 Height to keep free under a dialog body for the button row.
 
void Touchline::pauseSetting ()
 "Pause the match while this is open" (a saved setting).
 
bool Touchline::pausesMatch ()
 Whether the match pauses while a matchday dialog is open.
 
std::string Touchline::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.
 
std::string Touchline::playerName (const Lineup &lineup, PlayerID player)
 Name of a player of the matchday squad (empty when unknown).
 
ImVec4 Touchline::conditionColor (float condition)
 Condition bar colour (fresh, tiring, exhausted).