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
8
struct
ChatWidget
:
HudWidget
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
14
private
:
15
HudChatState
chat_
{};
16
std::span<const HudVoiceSpeaker>
speakers_
{};
17
};
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
ChatWidget::chat_
HudChatState chat_
Definition
ChatWidget.hpp:15
ChatWidget::ChatWidget
ChatWidget()
Definition
ChatWidget.cpp:44
ChatWidget::draw
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition
ChatWidget.cpp:60
ChatWidget::update
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition
ChatWidget.cpp:53
ChatWidget::speakers_
std::span< const HudVoiceSpeaker > speakers_
Definition
ChatWidget.hpp:16
HudChatState
Definition
HudTypes.hpp:320
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
src
client
hud
widgets
ChatWidget.hpp
Generated by
1.16.1