group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
ChatWidget.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "hud/HudWidget.hpp"
7
9{
10 ChatWidget();
11 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
12 void draw(HudContext& ctx, float drawX, float drawY) override;
13
14private:
16 std::span<const HudVoiceSpeaker> speakers_{};
17};
Base struct for all HUD widgets.
Accumulates HUD geometry during a frame for batch rendering.
Definition HudContext.hpp:19
Fixed-size tween pool. No heap allocations.
Definition HudTween.hpp:35
HudChatState chat_
Definition ChatWidget.hpp:15
ChatWidget()
Definition ChatWidget.cpp:44
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition ChatWidget.cpp:60
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition ChatWidget.cpp:53
std::span< const HudVoiceSpeaker > speakers_
Definition ChatWidget.hpp:16
Definition HudTypes.hpp:320
Snapshot of game state consumed by the HUD each frame.
Definition HudTypes.hpp:367
Base class for a retained HUD element.
Definition HudWidget.hpp:16