EchoesOfFate
A game for our COMP315 Project
 
Loading...
Searching...
No Matches
SettingMenuState Class Reference

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

PauseMenuStatemenu
 New function to set menu reference.
 

Detailed Description

Forward declaration to avoid circular dependency.

Constructor & Destructor Documentation

◆ SettingMenuState()

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

Member Function Documentation

◆ draw()

void SettingMenuState::draw ( sf::RenderWindow & window)

Draw the sound button

Draw the back button

◆ handleClick()

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

◆ isSoundOn()

bool SettingMenuState::isSoundOn ( ) const

◆ setMenuReference()

void SettingMenuState::setMenuReference ( PauseMenuState * menuPtr)

◆ setMusicReference()

void SettingMenuState::setMusicReference ( sf::Music & music)

Set the music reference

◆ setupButton()

void SettingMenuState::setupButton ( sf::Text & button,
const std::string & label,
float x,
float y )

◆ toggleSound()

void SettingMenuState::toggleSound ( )

Full volume

Set the music volume to 100

Mute

Set the music volume to 0 (mute it)

Member Data Documentation

◆ menu

PauseMenuState* SettingMenuState::menu

New function to set menu reference.


The documentation for this class was generated from the following files: