aboutsummaryrefslogtreecommitdiff
path: root/src/guiPauseMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiPauseMenu.cpp')
-rw-r--r--src/guiPauseMenu.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/guiPauseMenu.cpp b/src/guiPauseMenu.cpp
index 3b1861b3d..e542a28e9 100644
--- a/src/guiPauseMenu.cpp
+++ b/src/guiPauseMenu.cpp
@@ -34,10 +34,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
GUIPauseMenu::GUIPauseMenu(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
IGameCallback *gamecallback,
- IMenuManager *menumgr):
- GUIModalMenu(env, parent, id, menumgr)
+ IMenuManager *menumgr,
+ bool simple_singleplayer_mode):
+ GUIModalMenu(env, parent, id, menumgr),
+ m_gamecallback(gamecallback),
+ m_simple_singleplayer_mode(simple_singleplayer_mode)
{
- m_gamecallback = gamecallback;
}
GUIPauseMenu::~GUIPauseMenu()
@@ -106,7 +108,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
*/
const s32 btn_height = 30;
const s32 btn_gap = 20;
- const s32 btn_num = 4;
+ const s32 btn_num = m_simple_singleplayer_mode ? 3 : 4;
s32 btn_y = size.Y/2-((btn_num*btn_height+(btn_num-1)*btn_gap))/2;
changeCtype("");
{
@@ -116,18 +118,21 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
wgettext("Continue"));
}
btn_y += btn_height + btn_gap;
+ if(!m_simple_singleplayer_mode)
{
- core::rect<s32> rect(0, 0, 140, btn_height);
- rect = rect + v2s32(size.X/2-140/2, btn_y);
- Environment->addButton(rect, this, 261,
- wgettext("Change Password"));
+ {
+ core::rect<s32> rect(0, 0, 140, btn_height);
+ rect = rect + v2s32(size.X/2-140/2, btn_y);
+ Environment->addButton(rect, this, 261,
+ wgettext("Change Password"));
+ }
+ btn_y += btn_height + btn_gap;
}
- 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("Disconnect"));
+ wgettext("Exit to Menu"));
}
btn_y += btn_height + btn_gap;
{