add warning about settings not working from the pause menu

This commit is contained in:
darkrose 2015-08-15 17:27:03 +10:00
parent 5bdf478337
commit b4691bbd06
4 changed files with 20 additions and 5 deletions

View File

@ -1173,7 +1173,7 @@ bool GUIMainMenu::OnEvent(const SEvent& event)
return true;
case GUI_ID_TAB_SETTINGS:
{
GUISettingsMenu *smenu = new GUISettingsMenu(env, parent, -1,menumgr);
GUISettingsMenu *smenu = new GUISettingsMenu(env, parent, -1,menumgr, false);
smenu->drop();
return true;
}

View File

@ -221,7 +221,7 @@ bool GUIPauseMenu::OnEvent(const SEvent& event)
return true;
case 265: // settings
{
GUISettingsMenu *smenu = new GUISettingsMenu(env, parent, -1,menumgr);
GUISettingsMenu *smenu = new GUISettingsMenu(env, parent, -1,menumgr, true);
smenu->drop();
return true;
}

View File

@ -44,10 +44,12 @@ GUISettingsMenu::GUISettingsMenu(
gui::IGUIElement*
parent,
s32 id,
IMenuManager *menumgr
IMenuManager *menumgr,
bool is_ingame
):
GUIModalMenu(env, parent, id, menumgr),
m_accepted(false)
m_accepted(false),
m_is_ingame(is_ingame)
{
activeKey = -1;
init_keys();
@ -370,6 +372,12 @@ void GUISettingsMenu::regenerateGui(v2u32 screensize)
gui::IGUICheckBox *c = Environment->addCheckBox(wield_index, rect, this, GUI_ID_WIELDINDEX_CB, wgettext("Wieldring Index"));
c->setEnabled(!hotbar);
}
if (m_is_ingame) {
core::rect<s32> rect(0, 0, 550, 20);
rect += topleft_content + v2s32(0, 200);
gui::IGUIStaticText *t = Environment->addStaticText(wgettext("Some settings cannot be changed in-game."), rect, false, true, this, -1);
t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
}else if (m_data.selected_tab == TAB_SETTINGS_VIDEO) {
{
core::rect<s32> rect(0, 0, 550, 20);
@ -407,6 +415,12 @@ void GUISettingsMenu::regenerateGui(v2u32 screensize)
rect += topleft_content + v2s32(80, 210);
Environment->addCheckBox(anisotropic, rect, this, GUI_ID_ANISOTROPIC_CB, wgettext("Anisotropic Filtering"));
}
if (m_is_ingame) {
core::rect<s32> rect(0, 0, 550, 20);
rect += topleft_content + v2s32(0, 250);
gui::IGUIStaticText *t = Environment->addStaticText(wgettext("Some settings cannot be changed in-game."), rect, false, true, this, -1);
t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
}else if (m_data.selected_tab == TAB_SETTINGS_SOUND) {
{
core::rect<s32> rect(0, 0, 550, 20);

View File

@ -114,7 +114,7 @@ class GUISettingsMenu: public GUIModalMenu
{
public:
GUISettingsMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent,
s32 id, IMenuManager *menumgr);
s32 id, IMenuManager *menumgr, bool is_ingame);
~GUISettingsMenu();
void removeChildren();
@ -133,6 +133,7 @@ private:
SettingsMenuData m_data;
bool m_accepted;
v2u32 m_screensize;
bool m_is_ingame;
void init_keys();
void save();