group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
EquipmentSlots Struct Reference

#include <EquipmentSlots.hpp>

Inheritance diagram for EquipmentSlots:
[legend]
Collaboration diagram for EquipmentSlots:
[legend]

Public Member Functions

 EquipmentSlots ()
void update (float dt, const HudGameState &state, HudTweenPool &tweens) override
 Called each frame before draw(). Update animation, consume events.
void draw (HudContext &ctx, float drawX, float drawY) override
 Emit geometry into the draw context.
Public Member Functions inherited from HudWidget
virtual ~HudWidget ()=default

Public Attributes

float slotSize = 64.f
float slotGap = 6.f
float keyFontSize = 8.f
float countFontSize = 14.f
float statusFontSize = 10.f
Public Attributes inherited from HudWidget
bool visible = true
HudAnchor anchor = HudAnchor::TopLeft
float offsetX = 0.f
float offsetY = 0.f
float width = 0.f
float height = 0.f
float uiScale_ = 1.f
 Set by Hud each frame (screenH / 1080).

Private Attributes

HudEquipmentState state_

Constructor & Destructor Documentation

◆ EquipmentSlots()

EquipmentSlots::EquipmentSlots ( )

Member Function Documentation

◆ draw()

void EquipmentSlots::draw ( HudContext & ctx,
float drawX,
float drawY )
overridevirtual

Emit geometry into the draw context.

Parameters
ctxImmediate-mode draw API.
drawXResolved pixel X (anchor + offset already applied).
drawYResolved pixel Y.

Implements HudWidget.

Here is the call graph for this function:

◆ update()

void EquipmentSlots::update ( float dt,
const HudGameState & state,
HudTweenPool & tweens )
overridevirtual

Called each frame before draw(). Update animation, consume events.

Implements HudWidget.

Member Data Documentation

◆ countFontSize

float EquipmentSlots::countFontSize = 14.f

◆ keyFontSize

float EquipmentSlots::keyFontSize = 8.f

◆ slotGap

float EquipmentSlots::slotGap = 6.f

◆ slotSize

float EquipmentSlots::slotSize = 64.f

◆ state_

HudEquipmentState EquipmentSlots::state_
private

◆ statusFontSize

float EquipmentSlots::statusFontSize = 10.f

The documentation for this struct was generated from the following files: