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

#include <BuyMenu.hpp>

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

Public Member Functions

 BuyMenu ()
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.
void toggle (bool isBuyPhase)
Public Member Functions inherited from HudWidget
virtual ~HudWidget ()=default

Public Attributes

float panelWidth = 450.f
float panelHeight = 380.f
float fontSize = 20.f
float itemHeight = 34.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

bool isBuyPhase_ = false
float openAlpha_ = 0.f

Constructor & Destructor Documentation

◆ BuyMenu()

BuyMenu::BuyMenu ( )

Member Function Documentation

◆ draw()

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

◆ toggle()

void BuyMenu::toggle ( bool isBuyPhase)

◆ update()

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

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

Implements HudWidget.

Here is the call graph for this function:

Member Data Documentation

◆ fontSize

float BuyMenu::fontSize = 20.f

◆ isBuyPhase_

bool BuyMenu::isBuyPhase_ = false
private

◆ itemHeight

float BuyMenu::itemHeight = 34.f

◆ openAlpha_

float BuyMenu::openAlpha_ = 0.f
private

◆ panelHeight

float BuyMenu::panelHeight = 380.f

◆ panelWidth

float BuyMenu::panelWidth = 450.f

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