Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::render::SoundCue Struct Reference

What an important sound tells the player, shown while it plays. More...

#include <aegis2d/render/sound_cues.hpp>

Public Attributes

std::string caption
 Short caption, such as "Enemy incoming" or "Low life".
 
std::optional< Vec2 > source = std::nullopt
 Where the sound comes from, in logical pixels; nothing for a sound with no place (an alarm, a voice).
 
Color color {.r = 1.0F, .g = 1.0F, .b = 1.0F, .a = 1.0F}
 Color of the caption.
 
float seconds = 2.0F
 How long the cue stays, in seconds; it fades out during the last half second.
 

Detailed Description

What an important sound tells the player, shown while it plays.

Member Data Documentation

◆ caption

std::string aegis2d::render::SoundCue::caption

Short caption, such as "Enemy incoming" or "Low life".

◆ color

Color aegis2d::render::SoundCue::color {.r = 1.0F, .g = 1.0F, .b = 1.0F, .a = 1.0F}

Color of the caption.

◆ seconds

float aegis2d::render::SoundCue::seconds = 2.0F

How long the cue stays, in seconds; it fades out during the last half second.

◆ source

std::optional<Vec2> aegis2d::render::SoundCue::source = std::nullopt

Where the sound comes from, in logical pixels; nothing for a sound with no place (an alarm, a voice).


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