9#include <aegis2d/render/export.hpp>
27 std::optional<Vec2>
source = std::nullopt;
60 static constexpr float fade = 0.5F;
65 explicit SoundCues(
bool enabled =
false, std::size_t limit = 4) noexcept;
69 void set_enabled(
bool enabled) noexcept;
73 [[nodiscard]]
bool enabled() const noexcept;
83 void update(
float seconds) noexcept;
87 [[nodiscard]]
std::span<const
ShownCue> shown() const noexcept;
102 void save(core::Config& settings,
std::string_view path) const;
109 void load(const core::Config& settings,
std::string_view path);
Text drawn with a bitmap font, through the sprite batcher.
Monospaced font whose glyphs are cells of a texture, drawn as sprites.
Definition bitmap_font.hpp:68
What the game draws with, whatever the graphics API behind it.
Definition renderer.hpp:81
Captions and direction arrows for the sounds a deaf or hard-of-hearing player, or anyone playing mute...
Definition sound_cues.hpp:57
SoundCues(bool enabled=false, std::size_t limit=4) noexcept
Creates the cues, with none shown.
RGBA color used by the renderer.
JSON configuration with dotted-path lookups, which can be changed and saved.
Vector and matrix types of the engine (GLM behind engine names).
OpenGL renderer: sprites, text and camera (client only).
Definition bitmap_font.hpp:16
Definition endpoint.hpp:85
Backend-independent renderer interface and the sprite it draws.
RGBA color with components in [0, 1].
Definition color.hpp:10
float r
Red component.
Definition color.hpp:12
Axis-aligned rectangle.
Definition renderer.hpp:20
A cue on screen and the time it has left.
Definition sound_cues.hpp:35
SoundCue cue
The cue as given to SoundCues::show().
Definition sound_cues.hpp:37
float left
Seconds before it disappears.
Definition sound_cues.hpp:39
What an important sound tells the player, shown while it plays.
Definition sound_cues.hpp:22
float seconds
How long the cue stays, in seconds; it fades out during the last half second.
Definition sound_cues.hpp:31
std::string caption
Short caption, such as "Enemy incoming" or "Low life".
Definition sound_cues.hpp:24
std::optional< Vec2 > source
Where the sound comes from, in logical pixels; nothing for a sound with no place (an alarm,...
Definition sound_cues.hpp:27
Color color
Color of the caption.
Definition sound_cues.hpp:29
How a text is drawn.
Definition bitmap_font.hpp:49