summaryrefslogtreecommitdiff
path: root/src/guiMainMenu.cpp
diff options
context:
space:
mode:
authorobneq <obbneq@gmail.com>2012-12-02 00:08:35 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-12-02 00:52:35 +0200
commit151fad1f2b9a5705cb98b3bd38da770634bd4029 (patch)
treea8a4162c7e5c64977820f9075c4352d09811957c /src/guiMainMenu.cpp
parent27373919f4369c0c511f9f0ac66854b7f76e101d (diff)
downloadminetest-151fad1f2b9a5705cb98b3bd38da770634bd4029.tar.gz
minetest-151fad1f2b9a5705cb98b3bd38da770634bd4029.tar.bz2
minetest-151fad1f2b9a5705cb98b3bd38da770634bd4029.zip
Add checkboxes for shaders and on-demand item visual generation
Diffstat (limited to 'src/guiMainMenu.cpp')
-rw-r--r--src/guiMainMenu.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp
index 0bdb44e5d..c711577b0 100644
--- a/src/guiMainMenu.cpp
+++ b/src/guiMainMenu.cpp
@@ -102,6 +102,8 @@ enum
GUI_ID_ANISOTROPIC_CB,
GUI_ID_BILINEAR_CB,
GUI_ID_TRILINEAR_CB,
+ GUI_ID_SHADERS_CB,
+ GUI_ID_PRELOAD_ITEM_VISUALS_CB,
GUI_ID_DAMAGE_CB,
GUI_ID_CREATIVE_CB,
GUI_ID_JOIN_GAME_BUTTON,
@@ -616,6 +618,21 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
GUI_ID_TRILINEAR_CB, wgettext("Tri-Linear Filtering"));
}
+ // shader/on demand image loading settings
+ {
+ core::rect<s32> rect(0, 0, option_w+20, 30);
+ rect += m_topleft_client + v2s32(option_x+175*2, option_y);
+ Environment->addCheckBox(m_data->enable_shaders, rect, this,
+ GUI_ID_SHADERS_CB, wgettext("Shaders"));
+ }
+
+ {
+ core::rect<s32> rect(0, 0, option_w+20+20, 30);
+ rect += m_topleft_client + v2s32(option_x+175*2, option_y+20);
+ Environment->addCheckBox(m_data->preload_item_visuals, rect, this,
+ GUI_ID_PRELOAD_ITEM_VISUALS_CB, wgettext("Preload item visuals"));
+ }
+
// Key change button
{
core::rect<s32> rect(0, 0, 120, 30);
@@ -821,6 +838,18 @@ void GUIMainMenu::readInput(MainMenuData *dst)
}
{
+ gui::IGUIElement *e = getElementFromId(GUI_ID_SHADERS_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ dst->enable_shaders = ((gui::IGUICheckBox*)e)->isChecked() ? 2 : 0;
+ }
+
+ {
+ gui::IGUIElement *e = getElementFromId(GUI_ID_PRELOAD_ITEM_VISUALS_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ dst->preload_item_visuals = ((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();