group2
0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
LevelBarWidget.hpp
Go to the documentation of this file.
1
3
4
#pragma once
5
6
#include "
hud/HudWidget.hpp
"
7
8
struct
LevelBarWidget
:
HudWidget
9
{
10
float
barWidth
= 790.5f;
11
float
barHeight
= 39.5f;
12
float
svgScale
= 0.95f;
13
float
svgOffsetX
= 0.f;
14
float
svgOffsetY
= 0.f;
15
float
svgStretchX
= 0.57f;
16
float
svgStretchY
= 1.f;
17
float
svgRotationDeg
= 0.f;
18
19
LevelBarWidget
();
20
void
update
(
float
dt,
const
HudGameState
& state,
HudTweenPool
& tweens)
override
;
21
void
draw
(
HudContext
& ctx,
float
drawX,
float
drawY)
override
;
22
23
private
:
24
float
progress_
= 0.f;
25
};
HudWidget.hpp
Base struct for all HUD widgets.
HudContext
Accumulates HUD geometry during a frame for batch rendering.
Definition
HudContext.hpp:19
HudTweenPool
Fixed-size tween pool. No heap allocations.
Definition
HudTween.hpp:35
HudGameState
Snapshot of game state consumed by the HUD each frame.
Definition
HudTypes.hpp:367
HudWidget
Base class for a retained HUD element.
Definition
HudWidget.hpp:16
LevelBarWidget::barWidth
float barWidth
Definition
LevelBarWidget.hpp:10
LevelBarWidget::svgStretchY
float svgStretchY
Definition
LevelBarWidget.hpp:16
LevelBarWidget::LevelBarWidget
LevelBarWidget()
Definition
LevelBarWidget.cpp:11
LevelBarWidget::svgScale
float svgScale
Definition
LevelBarWidget.hpp:12
LevelBarWidget::update
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition
LevelBarWidget.cpp:20
LevelBarWidget::svgOffsetY
float svgOffsetY
Definition
LevelBarWidget.hpp:14
LevelBarWidget::svgRotationDeg
float svgRotationDeg
Definition
LevelBarWidget.hpp:17
LevelBarWidget::svgOffsetX
float svgOffsetX
Definition
LevelBarWidget.hpp:13
LevelBarWidget::barHeight
float barHeight
Definition
LevelBarWidget.hpp:11
LevelBarWidget::draw
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition
LevelBarWidget.cpp:26
LevelBarWidget::svgStretchX
float svgStretchX
Definition
LevelBarWidget.hpp:15
LevelBarWidget::progress_
float progress_
Definition
LevelBarWidget.hpp:24
src
client
hud
widgets
LevelBarWidget.hpp
Generated by
1.16.1