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

#include <PopupNotification.hpp>

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

Classes

struct  Entry

Public Member Functions

 PopupNotification ()
 Construct the popup feed anchored above the bottom-center ability bar.
void update (float dt, const HudGameState &state, HudTweenPool &tweens) override
 Consume this-frame popup messages and advance retained popup lifetimes.
void draw (HudContext &ctx, float drawX, float drawY) override
 Draw active popup pills centered around the resolved HUD anchor.
Public Member Functions inherited from HudWidget
virtual ~HudWidget ()=default

Public Attributes

float entryHeight = 30.f
 Height of each popup pill in 1080p-scaled HUD units.
float entryGap = 6.f
 Vertical spacing between stacked popup pills.
float entryFontSize = 13.f
 Popup text size in 1080p-scaled HUD units.
float entryLifetime = 4.f
 Seconds each popup remains alive.
float fadeOut = 0.65f
 Seconds used for the final fade-out.
int maxEntries = 3
 Maximum simultaneous popup pills retained.
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

std::vector< Entryentries_

Constructor & Destructor Documentation

◆ PopupNotification()

PopupNotification::PopupNotification ( )

Construct the popup feed anchored above the bottom-center ability bar.

Member Function Documentation

◆ draw()

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

Draw active popup pills centered around the resolved HUD anchor.

Implements HudWidget.

Here is the call graph for this function:

◆ update()

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

Consume this-frame popup messages and advance retained popup lifetimes.

Implements HudWidget.

Member Data Documentation

◆ entries_

std::vector<Entry> PopupNotification::entries_
private

◆ entryFontSize

float PopupNotification::entryFontSize = 13.f

Popup text size in 1080p-scaled HUD units.

◆ entryGap

float PopupNotification::entryGap = 6.f

Vertical spacing between stacked popup pills.

◆ entryHeight

float PopupNotification::entryHeight = 30.f

Height of each popup pill in 1080p-scaled HUD units.

◆ entryLifetime

float PopupNotification::entryLifetime = 4.f

Seconds each popup remains alive.

◆ fadeOut

float PopupNotification::fadeOut = 0.65f

Seconds used for the final fade-out.

◆ maxEntries

int PopupNotification::maxEntries = 3

Maximum simultaneous popup pills retained.


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