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

#include <LevelBarWidget.hpp>

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

Public Member Functions

 LevelBarWidget ()
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 barWidth = 790.5f
float barHeight = 39.5f
float svgScale = 0.95f
float svgOffsetX = 0.f
float svgOffsetY = 0.f
float svgStretchX = 0.57f
float svgStretchY = 1.f
float svgRotationDeg = 0.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
HudColor tint {1.f, 1.f, 1.f, 1.f}
float uiScale_ = 1.f
 Set by Hud each frame (screenH / 1080).

Private Attributes

float progress_ = 0.f

Constructor & Destructor Documentation

◆ LevelBarWidget()

LevelBarWidget::LevelBarWidget ( )

Member Function Documentation

◆ draw()

void LevelBarWidget::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 LevelBarWidget::update ( float dt,
const HudGameState & state,
HudTweenPool & tweens )
overridevirtual

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

Implements HudWidget.

Member Data Documentation

◆ barHeight

float LevelBarWidget::barHeight = 39.5f

◆ barWidth

float LevelBarWidget::barWidth = 790.5f

◆ progress_

float LevelBarWidget::progress_ = 0.f
private

◆ svgOffsetX

float LevelBarWidget::svgOffsetX = 0.f

◆ svgOffsetY

float LevelBarWidget::svgOffsetY = 0.f

◆ svgRotationDeg

float LevelBarWidget::svgRotationDeg = 0.f

◆ svgScale

float LevelBarWidget::svgScale = 0.95f

◆ svgStretchX

float LevelBarWidget::svgStretchX = 0.57f

◆ svgStretchY

float LevelBarWidget::svgStretchY = 1.f

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