aboutsummaryrefslogtreecommitdiff
path: root/src/guiMainMenu.cpp
diff options
context:
space:
mode:
authorproller <proller@github.com>2013-03-23 17:37:50 +0400
committerproller <proller@github.com>2013-03-23 19:17:08 +0400
commitf98d0433f9a72c09eddad319763e750e2deb19a3 (patch)
tree3aa3ff9781ac56034526c37723638dbed4b513c6 /src/guiMainMenu.cpp
parent34b185e95511983d0eb9f3e9b5c651f1eacf4561 (diff)
downloadminetest-f98d0433f9a72c09eddad319763e750e2deb19a3.tar.gz
minetest-f98d0433f9a72c09eddad319763e750e2deb19a3.tar.bz2
minetest-f98d0433f9a72c09eddad319763e750e2deb19a3.zip
Random guest name and finite liquid checkbox
Diffstat (limited to 'src/guiMainMenu.cpp')
-rw-r--r--src/guiMainMenu.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp
index 79170d99a..9e6b01dd6 100644
--- a/src/guiMainMenu.cpp
+++ b/src/guiMainMenu.cpp
@@ -140,6 +140,7 @@ enum
GUI_ID_SHADERS_CB,
GUI_ID_PRELOAD_ITEM_VISUALS_CB,
GUI_ID_ENABLE_PARTICLES_CB,
+ GUI_ID_LIQUID_FINITE_CB,
GUI_ID_DAMAGE_CB,
GUI_ID_CREATIVE_CB,
GUI_ID_PUBLIC_CB,
@@ -430,6 +431,10 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
e->setDrawBackground(true);
if (m_data->serverlist_show_available == false)
m_data->servers = ServerList::getLocal();
+#if USE_CURL
+ else
+ m_data->servers = ServerList::getOnline();
+#endif
updateGuiServerList();
e->setSelected(0);
}
@@ -722,6 +727,13 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
GUI_ID_ENABLE_PARTICLES_CB, wgettext("Enable Particles"));
}
+ {
+ core::rect<s32> rect(0, 0, option_w+20+20, 30);
+ rect += m_topleft_client + v2s32(option_x+175*2, option_y+20*3);
+ Environment->addCheckBox(m_data->liquid_finite, rect, this,
+ GUI_ID_LIQUID_FINITE_CB, wgettext("Finite liquid"));
+ }
+
// Key change button
{
core::rect<s32> rect(0, 0, 120, 30);
@@ -969,6 +981,12 @@ void GUIMainMenu::readInput(MainMenuData *dst)
}
{
+ gui::IGUIElement *e = getElementFromId(GUI_ID_LIQUID_FINITE_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ dst->liquid_finite = ((gui::IGUICheckBox*)e)->isChecked();
+ }
+
+ {
gui::IGUIElement *e = getElementFromId(GUI_ID_WORLD_LISTBOX);
if(e != NULL && e->getType() == gui::EGUIET_LIST_BOX)
dst->selected_world = ((gui::IGUIListBox*)e)->getSelected();