On this page
  1. SoundName
  2. view
  3. empty
  4. operator==

rmp::ui::SoundName

class #include <rmp/ui.h> include/rmp/ui.h:279
class SoundName

The name of a sound, as rmp::audio::play() takes it ("click" is click.wav, click.ogg...): written as a string, .click = "click". Giving one is what brings the sound player into the game, so a UI that never names a sound carries none of rmp::audio's decoders.

SoundName

template <std::size_t N> // NOLINTNEXTLINE(google-explicit
SoundName(std::string_view name)
SoundName(const std::string &name)

An array, not a pointer: what a string literal is. Implicit, and C, for .click = "click".

view

std::string_view view() const

The name, as rmp::audio::play() takes it; valid while this SoundName is.

empty

bool empty() const

True for "": silence, which turns off a sound set further out.

operator==

bool operator==(const SoundName &a, std::string_view b)

True when it is that name: sounds.click == "click".