group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
CrosshairWidget.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "hud/HudWidget.hpp"
7
9{
11
13 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
14 void draw(HudContext& ctx, float drawX, float drawY) override;
15};
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
Crosshair appearance parameters.
Definition HudTypes.hpp:75
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition CrosshairWidget.cpp:11
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition CrosshairWidget.cpp:16
CrosshairStyle style
Definition CrosshairWidget.hpp:10
CrosshairWidget()
Definition CrosshairWidget.cpp:6
Snapshot of game state consumed by the HUD each frame.
Definition HudTypes.hpp:148
Base class for a retained HUD element.
Definition HudWidget.hpp:16