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

Touchline shouts of the live match: one compact button per shout (Shift+1 .. Shift+0, Shift+- on the keyboard). The shout in force is highlighted and filled by the share of its effect that is left; shouts in quick succession have less effect, which the fill shows right away. More...

Functions

int indexForScancode (int scancode)
 Shout slot of a Shift+key press by physical key (the number row, then the key right of 0), or -1.
 
std::string keyName (std::size_t index)
 Key (chord) that gives the shout at index, e.g. "Shift+1".
 
bool available (const MatchEngine &engine)
 Shouts can be given now (the match is being played).
 
float height (float width)
 Height of the bar at width (it wraps onto more rows).
 
bool shout (const TouchlineContext &context, std::size_t index)
 Gives the shout at index of MatchChanges::SHOUTS and notes it in the HUD status; false when shouts are not possible now.
 
void render (const TouchlineContext &context, float width)
 Draws the bar in the current window, width wide.
 

Detailed Description

Touchline shouts of the live match: one compact button per shout (Shift+1 .. Shift+0, Shift+- on the keyboard). The shout in force is highlighted and filled by the share of its effect that is left; shouts in quick succession have less effect, which the fill shows right away.

Function Documentation

◆ available()

bool MatchShoutsBar::available ( const MatchEngine &  engine)

Shouts can be given now (the match is being played).

◆ height()

float MatchShoutsBar::height ( float  width)

Height of the bar at width (it wraps onto more rows).

◆ indexForScancode()

int MatchShoutsBar::indexForScancode ( int  scancode)

Shout slot of a Shift+key press by physical key (the number row, then the key right of 0), or -1.

◆ keyName()

std::string MatchShoutsBar::keyName ( std::size_t  index)

Key (chord) that gives the shout at index, e.g. "Shift+1".

◆ render()

void MatchShoutsBar::render ( const TouchlineContext &  context,
float  width 
)

Draws the bar in the current window, width wide.

◆ shout()

bool MatchShoutsBar::shout ( const TouchlineContext &  context,
std::size_t  index 
)

Gives the shout at index of MatchChanges::SHOUTS and notes it in the HUD status; false when shouts are not possible now.