Forward declaration to avoid circular dependency. More...
#include <SettingMenuState.h>
Public Member Functions | |
| SettingMenuState () | |
| Please note this is a Very old version of the options Needs to work with the new audio manager class. | |
| void | setupButton (sf::Text &button, const std::string &label, float x, float y) |
| void | handleClick (sf::RenderWindow &window) |
| void | draw (sf::RenderWindow &window) |
| void | toggleSound () |
| bool | isSoundOn () const |
| void | setMusicReference (sf::Music &music) |
| void | setMenuReference (PauseMenuState *menuPtr) |
Public Attributes | |
| PauseMenuState * | menu |
| New function to set menu reference. | |
Forward declaration to avoid circular dependency.
| SettingMenuState::SettingMenuState | ( | ) |
Please note this is a Very old version of the options Needs to work with the new audio manager class.
Include SceneClass to access music
Load the font
Set up buttons for sound and back navigation
Start with sound on
| void SettingMenuState::draw | ( | sf::RenderWindow & | window | ) |
Draw the sound button
Draw the back button
| void SettingMenuState::handleClick | ( | sf::RenderWindow & | window | ) |
Toggle sound when sound button is clicked
Return to the main menu when the back button is clicked
Switch back to main menu
| bool SettingMenuState::isSoundOn | ( | ) | const |
| void SettingMenuState::setMenuReference | ( | PauseMenuState * | menuPtr | ) |
| void SettingMenuState::setMusicReference | ( | sf::Music & | music | ) |
Set the music reference
| void SettingMenuState::setupButton | ( | sf::Text & | button, |
| const std::string & | label, | ||
| float | x, | ||
| float | y ) |
| void SettingMenuState::toggleSound | ( | ) |
Full volume
Set the music volume to 100
Mute
Set the music volume to 0 (mute it)
| PauseMenuState* SettingMenuState::menu |
New function to set menu reference.