Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_shouts_bar.h File Reference
#include <cstddef>
#include <string>
#include "gui/scenes/match_touchline.h"

Go to the source code of this file.

Namespaces

namespace  MatchShoutsBar
 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.
 

Functions

bool MatchShoutsBar::available (const MatchEngine &engine)
 Shouts can be given now (the match is being played).
 
float MatchShoutsBar::height (float width)
 Height of the bar at width (it wraps onto more rows).
 
void MatchShoutsBar::render (const TouchlineContext &context, float width)
 Draws the bar in the current window, width wide.
 
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.
 
std::string MatchShoutsBar::keyName (std::size_t index)
 Key (chord) that gives the shout at index, e.g. "Shift+1".
 
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.