|
Player12
An open source football management simulator
|
#include "match_shouts_bar.h"#include <SDL3/SDL.h>#include <fmt/printf.h>#include <algorithm>#include <string>#include "global/language_manager.h"#include "gui/input_actions.h"#include "gui/view_models/match_changes.h"#include "gui/widgets/theme.h"#include "gui/widgets/widgets.h"#include "model/match_engine.h"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 | |
| 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::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). | |
| 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. | |
| void | MatchShoutsBar::render (const TouchlineContext &context, float width) |
Draws the bar in the current window, width wide. | |