aboutsummaryrefslogtreecommitdiff
path: root/src/guiPauseMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiPauseMenu.cpp')
-rw-r--r--src/guiPauseMenu.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/guiPauseMenu.cpp b/src/guiPauseMenu.cpp
index f6cbf248f..9d44b2e82 100644
--- a/src/guiPauseMenu.cpp
+++ b/src/guiPauseMenu.cpp
@@ -79,6 +79,11 @@ void GUIPauseMenu::removeChildren()
if(e != NULL)
e->remove();
}
+ {
+ gui::IGUIElement *e = getElementFromId(262);
+ if(e != NULL)
+ e->remove();
+ }
}
void GUIPauseMenu::regenerateGui(v2u32 screensize)
@@ -108,7 +113,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
*/
const s32 btn_height = 30;
const s32 btn_gap = 20;
- const s32 btn_num = m_simple_singleplayer_mode ? 3 : 4;
+ const s32 btn_num = m_simple_singleplayer_mode ? 4 : 5;
s32 btn_y = size.Y/2-((btn_num*btn_height+(btn_num-1)*btn_gap))/2;
changeCtype("");
{
@@ -131,6 +136,13 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 140, btn_height);
rect = rect + v2s32(size.X/2-140/2, btn_y);
+ Environment->addButton(rect, this, 262,
+ wgettext("Sound Volume"));
+ }
+ btn_y += btn_height + btn_gap;
+ {
+ core::rect<s32> rect(0, 0, 140, btn_height);
+ rect = rect + v2s32(size.X/2-140/2, btn_y);
Environment->addButton(rect, this, 260,
wgettext("Exit to Menu"));
}
@@ -236,6 +248,10 @@ bool GUIPauseMenu::OnEvent(const SEvent& event)
quitMenu();
m_gamecallback->changePassword();
return true;
+ case 262:
+ quitMenu();
+ m_gamecallback->changeVolume();
+ return true;
case 260: // disconnect
m_gamecallback->disconnect();
quitMenu();