group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
MatchHeader Struct Reference

#include <MatchHeader.hpp>

Inheritance diagram for MatchHeader:
[legend]
Collaboration diagram for MatchHeader:
[legend]

Public Member Functions

 MatchHeader ()
void update (float dt, const HudGameState &state, HudTweenPool &tweens) override
 Called each frame before draw(). Update animation, consume events.
void draw (HudContext &ctx, float drawX, float drawY) override
 Emit geometry into the draw context.
Public Member Functions inherited from HudWidget
virtual ~HudWidget ()=default

Public Attributes

float timeFontSize = 22.f
float subFontSize = 9.f
float panelPadX = 24.f
float panelPadY = 6.f
Public Attributes inherited from HudWidget
bool visible = true
HudAnchor anchor = HudAnchor::TopLeft
float offsetX = 0.f
float offsetY = 0.f
float width = 0.f
float height = 0.f
float uiScale_ = 1.f
 Set by Hud each frame (screenH / 1080).

Private Attributes

int seconds_ = 0
 Current displayed time (seconds).
int fragTarget_ = 30
bool useElapsed_ = true
 If false, show countdown instead (round timer fallback).

Constructor & Destructor Documentation

◆ MatchHeader()

MatchHeader::MatchHeader ( )

Member Function Documentation

◆ draw()

void MatchHeader::draw ( HudContext & ctx,
float drawX,
float drawY )
overridevirtual

Emit geometry into the draw context.

Parameters
ctxImmediate-mode draw API.
drawXResolved pixel X (anchor + offset already applied).
drawYResolved pixel Y.

Implements HudWidget.

Here is the call graph for this function:

◆ update()

void MatchHeader::update ( float dt,
const HudGameState & state,
HudTweenPool & tweens )
overridevirtual

Called each frame before draw(). Update animation, consume events.

Implements HudWidget.

Member Data Documentation

◆ fragTarget_

int MatchHeader::fragTarget_ = 30
private

◆ panelPadX

float MatchHeader::panelPadX = 24.f

◆ panelPadY

float MatchHeader::panelPadY = 6.f

◆ seconds_

int MatchHeader::seconds_ = 0
private

Current displayed time (seconds).

◆ subFontSize

float MatchHeader::subFontSize = 9.f

◆ timeFontSize

float MatchHeader::timeFontSize = 22.f

◆ useElapsed_

bool MatchHeader::useElapsed_ = true
private

If false, show countdown instead (round timer fallback).


The documentation for this struct was generated from the following files: