fixed music volume gauge... actually the bug was mine *blush*, discard the explaination i gave in previous commit

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3393 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-04-16 01:42:57 +00:00
parent 7ff6333abc
commit 956178350f
2 changed files with 5 additions and 3 deletions

@ -65,7 +65,7 @@ public:
m_current_music->switchToFastMusic();}
void setMasterMusicVolume(float gain);
int getMasterMusicVolume() const { return m_masterGain; }
float getMasterMusicVolume() const { return m_masterGain; }
MusicInformation *getCurrentMusic() {return m_current_music; }
MusicInformation *getMusicInformation(const std::string& filename);

@ -265,6 +265,7 @@ namespace StateManager
*/
void menuEventOptions(GUIEngine::Widget* widget, std::string& name)
{
// -- init
if(name == "init")
{
const std::string& screen_name = GUIEngine::getCurrentScreen()->getName();
@ -278,17 +279,18 @@ namespace StateManager
else if(screen_name == "options_input.stkgui") ribbon->select( "controls" );
}
// audio-video sub-screen
if(screen_name == "options_av.stkgui")
{
GUIEngine::GaugeWidget* gauge = dynamic_cast<GUIEngine::GaugeWidget*>
(GUIEngine::getCurrentScreen()->getWidget("sfx_volume"));
(GUIEngine::getCurrentScreen()->getWidget("sfx_volume"));
assert(gauge != NULL);
gauge->setValue( sfx_manager->getMasterSFXVolume() );
gauge = dynamic_cast<GUIEngine::GaugeWidget*>
(GUIEngine::getCurrentScreen()->getWidget("music_volume"));
(GUIEngine::getCurrentScreen()->getWidget("music_volume"));
assert(gauge != NULL);
gauge->setValue( sound_manager->getMasterMusicVolume() );
}