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

#include <AbilitySelectionWidget.hpp>

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

Public Member Functions

 AbilitySelectionWidget ()
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 panelWidth = 520.f
float choiceWidth = 244.f
float choiceHeight = 90.f
float choiceGap = 12.f
float headerFontSize = 20.f
float nameFontSize = 20.f
float bodyFontSize = 18.f
float keyFontSize = 18.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

HudAbilitySelectionState state_
std::string abilityMenuLabel_ = "Left Alt"
std::array< int, 2 > slotOption_ {0, 1}
std::array< std::string, 2 > slotTag_ {"LMB", "RMB"}

Constructor & Destructor Documentation

◆ AbilitySelectionWidget()

AbilitySelectionWidget::AbilitySelectionWidget ( )

Member Function Documentation

◆ draw()

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

◆ abilityMenuLabel_

std::string AbilitySelectionWidget::abilityMenuLabel_ = "Left Alt"
private

◆ bodyFontSize

float AbilitySelectionWidget::bodyFontSize = 18.f

◆ choiceGap

float AbilitySelectionWidget::choiceGap = 12.f

◆ choiceHeight

float AbilitySelectionWidget::choiceHeight = 90.f

◆ choiceWidth

float AbilitySelectionWidget::choiceWidth = 244.f

◆ headerFontSize

float AbilitySelectionWidget::headerFontSize = 20.f

◆ keyFontSize

float AbilitySelectionWidget::keyFontSize = 18.f

◆ nameFontSize

float AbilitySelectionWidget::nameFontSize = 20.f

◆ panelWidth

float AbilitySelectionWidget::panelWidth = 520.f

◆ slotOption_

std::array<int, 2> AbilitySelectionWidget::slotOption_ {0, 1}
private

◆ slotTag_

std::array<std::string, 2> AbilitySelectionWidget::slotTag_ {"LMB", "RMB"}
private

◆ state_

HudAbilitySelectionState AbilitySelectionWidget::state_
private

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