minor improvements
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3392 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
35d046ee42
commit
7ff6333abc
@ -14,18 +14,24 @@
|
||||
|
||||
<spacer proportion="1" width="10" proportion="1"/>
|
||||
|
||||
<div width="75%" height="40" layout="horizontal-row" >
|
||||
<label proportion="1" height="100%" text="Music"/>
|
||||
<checkbox id="music_enabled" proportion="1" height="100%" text="Enabled" />
|
||||
</div>
|
||||
<div width="75%" height="30" layout="horizontal-row" >
|
||||
<label proportion="100%" height="100%" text="Music"/>
|
||||
<!-- TODO - add check box -->
|
||||
<gauge id="music_volume" proportion="100%" height="100%"/>
|
||||
<spacer proportion="1" height="100%"/>
|
||||
<gauge id="music_volume" proportion="1" height="100%"/>
|
||||
</div>
|
||||
|
||||
<spacer proportion="1" width="10" proportion="1"/>
|
||||
|
||||
<div width="75%" height="40" layout="horizontal-row" >
|
||||
<label proportion="1" height="100%" text="Sound Effects"/>
|
||||
<checkbox id="sfx_enabled" proportion="1" height="100%" text="Enabled" />
|
||||
</div>
|
||||
<div width="75%" height="30" layout="horizontal-row" >
|
||||
<label proportion="100%" height="100%" text="Sound Effects"/>
|
||||
<!-- TODO - add check box -->
|
||||
<gauge id="sfx_volume" proportion="100%" height="100%"/>
|
||||
<spacer proportion="1" height="100%"/>
|
||||
<gauge id="sfx_volume" proportion="1" height="100%"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -267,27 +267,31 @@ namespace StateManager
|
||||
{
|
||||
if(name == "init")
|
||||
{
|
||||
const std::string& screen_name = GUIEngine::getCurrentScreen()->getName();
|
||||
|
||||
GUIEngine::RibbonWidget* ribbon = dynamic_cast<GUIEngine::RibbonWidget*>
|
||||
(GUIEngine::getCurrentScreen()->getWidget("options_choice"));
|
||||
if(ribbon != NULL)
|
||||
{
|
||||
const std::string& screen_name = GUIEngine::getCurrentScreen()->getName();
|
||||
if(screen_name == "options_av.stkgui") ribbon->select( "audio_video" );
|
||||
else if(screen_name == "options_players.stkgui") ribbon->select( "players" );
|
||||
else if(screen_name == "options_input.stkgui") ribbon->select( "controls" );
|
||||
}
|
||||
|
||||
GUIEngine::GaugeWidget* gauge = dynamic_cast<GUIEngine::GaugeWidget*>
|
||||
if(screen_name == "options_av.stkgui")
|
||||
{
|
||||
GUIEngine::GaugeWidget* gauge = dynamic_cast<GUIEngine::GaugeWidget*>
|
||||
(GUIEngine::getCurrentScreen()->getWidget("sfx_volume"));
|
||||
assert(gauge != NULL);
|
||||
|
||||
gauge->setValue( sfx_manager->getMasterSFXVolume() );
|
||||
|
||||
|
||||
gauge = dynamic_cast<GUIEngine::GaugeWidget*>
|
||||
(GUIEngine::getCurrentScreen()->getWidget("music_volume"));
|
||||
assert(gauge != NULL);
|
||||
gauge->setValue( sound_manager->getMasterMusicVolume() );
|
||||
assert(gauge != NULL);
|
||||
|
||||
gauge->setValue( sfx_manager->getMasterSFXVolume() );
|
||||
|
||||
|
||||
gauge = dynamic_cast<GUIEngine::GaugeWidget*>
|
||||
(GUIEngine::getCurrentScreen()->getWidget("music_volume"));
|
||||
assert(gauge != NULL);
|
||||
gauge->setValue( sound_manager->getMasterMusicVolume() );
|
||||
}
|
||||
}
|
||||
// -- options
|
||||
else if(name == "options_choice")
|
||||
|
Loading…
x
Reference in New Issue
Block a user