Player12
An open source football management simulator
Loading...
Searching...
No Matches
Touchline Namespace Reference

Shared frame and wording of the substitutions and tactics dialogs. More...

Functions

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

Detailed Description

Shared frame and wording of the substitutions and tactics dialogs.

Function Documentation

◆ beginDialog()

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.

Parameters
openedSet once the popup was opened; reset it to open again.
Returns
True while the dialog is shown (pair with ImGui::EndPopup()).

◆ conditionColor()

ImVec4 Touchline::conditionColor ( float  condition)

Condition bar colour (fresh, tiring, exhausted).

◆ footerHeight()

float Touchline::footerHeight ( )

Height to keep free under a dialog body for the button row.

◆ pauseSetting()

void Touchline::pauseSetting ( )

"Pause the match while this is open" (a saved setting).

◆ pausesMatch()

bool Touchline::pausesMatch ( )

Whether the match pauses while a matchday dialog is open.

◆ playerName()

std::string Touchline::playerName ( const Lineup &  lineup,
PlayerID  player 
)

Name of a player of the matchday squad (empty when unknown).

◆ refusalText()

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.