group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PickupPrompt.hpp
Go to the documentation of this file.
1
4
5#pragma once
6
7#include "hud/HudWidget.hpp"
8
17{
18 float fontSize = 24.f;
19 float keyFontSize = 26.f;
20 float keyBoxPadding = 5.f;
21 float keyBoxRadius = 4.f;
22 float spacing = 10.f;
23
25 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
26 void draw(HudContext& ctx, float drawX, float drawY) override;
27
28private:
29 int weaponId_ = 0;
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:148
Base class for a retained HUD element.
Definition HudWidget.hpp:16
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition PickupPrompt.cpp:41
float spacing
Gap between the key glyph box and the text.
Definition PickupPrompt.hpp:22
float keyBoxRadius
Corner radius of the key glyph box.
Definition PickupPrompt.hpp:21
float fontSize
Size of the descriptive text (logical px).
Definition PickupPrompt.hpp:18
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition PickupPrompt.cpp:47
float keyBoxPadding
Padding inside the key glyph box.
Definition PickupPrompt.hpp:20
int weaponId_
Definition PickupPrompt.hpp:29
float keyFontSize
Size of the "F" key glyph (logical px).
Definition PickupPrompt.hpp:19
PickupPrompt()
Definition PickupPrompt.cpp:31