11static constexpr float BTN_W = 140.0f;
12static constexpr float BTN_H = 40.0f;
16static constexpr Color
ACCENT = {210, 220, 240, 255};
23 .setBackgroundAlpha(178)
52 unsigned int h = seconds / 3600;
53 unsigned int m = (seconds % 3600) / 60;
54 unsigned int s = seconds % 60;
56 if (h > 0) out += std::to_string(h) +
"h ";
57 if (m > 0 || h > 0) out += std::to_string(m) +
"m ";
58 out += std::to_string(s) +
"s";
95 int sw = GetScreenWidth();
96 int sh = GetScreenHeight();
107 float btnX = panelBounds.x + (panelBounds.width -
BTN_W) / 2.0f;
static constexpr float PANEL_MIN_W
static constexpr Color ACCENT
static constexpr float BTN_W
static constexpr Color OVERLAY_COLOR
static constexpr Color PANEL_BORDER
static constexpr float BTN_MARGIN
static constexpr float BTN_H
static constexpr Color TITLE_COLOR
static const char * get(Key key)
void setDuration(int seconds, int64_t ticks)
Sets the win duration (server-authoritative, from gwt).
void _rebuildPanel(int scaledFontSize) const
void draw(int scaledFontSize) const override
Draws the widget.
void setWinner(const std::string &team, Color color)
Sets the winning team name and highlight color.
static std::string _formatDuration(unsigned int seconds)
bool handleInput() override
Handles button input. Always returns true (overlay blocks all input).