Dragonfly 4.20
A text-based game engine
|
Public Member Functions | |
int | loadMusic (std::string filename) |
void | setLabel (std::string new_label) |
std::string | getLabel () const |
void | play (bool loop=true) |
void | stop () |
void | pause () |
sf::Music * | getMusic () |
Private Member Functions | |
Music (Music const &) | |
void | operator= (Music const &) |
Private Attributes | |
sf::Music | m_music |
std::string | m_label |
|
private |
SFML doesn't allow music copy.
std::string df::Music::getLabel | ( | ) | const |
Get label associated with music.
sf::Music * df::Music::getMusic | ( | ) |
Return pointer to SFML music.
int df::Music::loadMusic | ( | std::string | filename | ) |
Associate music buffer with file.
Return 0 if ok, else -1.
|
private |
SFML doesn't allow music assignment.
void df::Music::pause | ( | ) |
Pause music.
void df::Music::play | ( | bool | loop = true | ) |
Play music.
If loop is true, repeat play when done.
void df::Music::setLabel | ( | std::string | new_label | ) |
Set label associated with music.
void df::Music::stop | ( | ) |
Stop music.
|
private |
Text label to identify music.
|
private |
The SFML music.