group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
MatchHeader.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13#include "hud/HudWidget.hpp"
14
16{
17 float timeFontSize = 22.f;
18 float subFontSize = 9.f;
19 float panelPadX = 24.f;
20 float panelPadY = 6.f;
21
23 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
24 void draw(HudContext& ctx, float drawX, float drawY) override;
25
26private:
27 int seconds_ = 0;
28 int fragTarget_ = 30;
29 bool useElapsed_ = true;
30};
Base struct for all HUD widgets.
Accumulates HUD geometry during a frame for batch rendering.
Definition HudContext.hpp:18
Fixed-size tween pool. No heap allocations.
Definition HudTween.hpp:35
Snapshot of game state consumed by the HUD each frame.
Definition HudTypes.hpp:192
Base class for a retained HUD element.
Definition HudWidget.hpp:16
bool useElapsed_
If false, show countdown instead (round timer fallback).
Definition MatchHeader.hpp:29
MatchHeader()
Definition MatchHeader.cpp:13
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition MatchHeader.cpp:33
int fragTarget_
Definition MatchHeader.hpp:28
float subFontSize
Definition MatchHeader.hpp:18
float panelPadY
Definition MatchHeader.hpp:20
float timeFontSize
Definition MatchHeader.hpp:17
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition MatchHeader.cpp:20
int seconds_
Current displayed time (seconds).
Definition MatchHeader.hpp:27
float panelPadX
Definition MatchHeader.hpp:19