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

#include <ScreenDecalWidget.hpp>

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

Public Member Functions

bool isTopDecal () const
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 decalWidth = 1920.f
float decalHeight = 165.65f
float decalScale = 1.f
float decalOffsetX = 0.f
float decalOffsetY = 0.f
float decalStretchX = 1.f
float decalStretchY = 1.f
float decalRotationDeg = 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).

Protected Member Functions

 ScreenDecalWidget (bool top)

Private Attributes

bool top_ = true

Constructor & Destructor Documentation

◆ ScreenDecalWidget()

ScreenDecalWidget::ScreenDecalWidget ( bool top)
explicitprotected
Here is the caller graph for this function:

Member Function Documentation

◆ draw()

void ScreenDecalWidget::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:

◆ isTopDecal()

bool ScreenDecalWidget::isTopDecal ( ) const
inlinenodiscard

◆ update()

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

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

Implements HudWidget.

Member Data Documentation

◆ decalHeight

float ScreenDecalWidget::decalHeight = 165.65f

◆ decalOffsetX

float ScreenDecalWidget::decalOffsetX = 0.f

◆ decalOffsetY

float ScreenDecalWidget::decalOffsetY = 0.f

◆ decalRotationDeg

float ScreenDecalWidget::decalRotationDeg = 0.f

◆ decalScale

float ScreenDecalWidget::decalScale = 1.f

◆ decalStretchX

float ScreenDecalWidget::decalStretchX = 1.f

◆ decalStretchY

float ScreenDecalWidget::decalStretchY = 1.f

◆ decalWidth

float ScreenDecalWidget::decalWidth = 1920.f

◆ top_

bool ScreenDecalWidget::top_ = true
private

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