aboutsummaryrefslogtreecommitdiff
path: root/src/guiMainMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiMainMenu.cpp')
-rw-r--r--src/guiMainMenu.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp
index a0a23828a..43ec85c8a 100644
--- a/src/guiMainMenu.cpp
+++ b/src/guiMainMenu.cpp
@@ -81,6 +81,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
bool fancy_trees;
bool smooth_lighting;
bool clouds_3d;
+ bool opaque_water;
// Client options
{
@@ -125,6 +126,13 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
else
clouds_3d = m_data->clouds_3d;
}
+ {
+ gui::IGUIElement *e = getElementFromId(GUI_ID_OPAQUE_WATER_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ opaque_water = ((gui::IGUICheckBox*)e)->isChecked();
+ else
+ opaque_water = m_data->opaque_water;
+ }
// Server options
{
@@ -260,6 +268,12 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
Environment->addCheckBox(clouds_3d, rect, this, GUI_ID_3D_CLOUDS_CB,
wgettext("3D Clouds"));
}
+ {
+ core::rect<s32> rect(0, 0, 250, 30);
+ rect += topleft_client + v2s32(35, 150+60);
+ Environment->addCheckBox(opaque_water, rect, this, GUI_ID_OPAQUE_WATER_CB,
+ wgettext("Opaque water"));
+ }
// Start game button
{
core::rect<s32> rect(0, 0, 180, 30);
@@ -377,9 +391,9 @@ void GUIMainMenu::acceptInput()
m_data->enable_damage = ((gui::IGUICheckBox*)e)->isChecked();
}
{
- gui::IGUIElement *e = getElementFromId(GUI_ID_3D_CLOUDS_CB);
+ gui::IGUIElement *e = getElementFromId(GUI_ID_FANCYTREE_CB);
if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
- m_data->clouds_3d = ((gui::IGUICheckBox*)e)->isChecked();
+ m_data->fancy_trees = ((gui::IGUICheckBox*)e)->isChecked();
}
{
gui::IGUIElement *e = getElementFromId(GUI_ID_SMOOTH_LIGHTING_CB);
@@ -387,9 +401,14 @@ void GUIMainMenu::acceptInput()
m_data->smooth_lighting = ((gui::IGUICheckBox*)e)->isChecked();
}
{
- gui::IGUIElement *e = getElementFromId(GUI_ID_FANCYTREE_CB);
+ gui::IGUIElement *e = getElementFromId(GUI_ID_3D_CLOUDS_CB);
if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
- m_data->fancy_trees = ((gui::IGUICheckBox*)e)->isChecked();
+ m_data->clouds_3d = ((gui::IGUICheckBox*)e)->isChecked();
+ }
+ {
+ gui::IGUIElement *e = getElementFromId(GUI_ID_OPAQUE_WATER_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ m_data->opaque_water = ((gui::IGUICheckBox*)e)->isChecked();
}
m_accepted = true;