X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2FguiKeyChangeMenu.cpp;h=6b0412821bd13c58acc91af36c08ed58ec599302;hb=183c81b5ecf4f9350936737f5091073d81733d73;hp=8f7c7245c1dc0fc437b54b965f527d2a0ba9bac9;hpb=52ba413185f96add259c480a68f5dffa389e80f4;p=oweals%2Fminetest.git diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index 8f7c7245c..6b0412821 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -57,6 +57,7 @@ enum GUI_ID_KEY_RANGE_BUTTON, // other GUI_ID_CB_AUX1_DESCENDS, + GUI_ID_CB_DOUBLETAP_JUMP, }; GUIKeyChangeMenu::GUIKeyChangeMenu(gui::IGUIEnvironment* env, @@ -149,6 +150,20 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) Environment->addCheckBox(g_settings->getBool("aux1_descends"), rect, this, GUI_ID_CB_AUX1_DESCENDS, wgettext("\"Use\" = climb down")); } + offset += v2s32(0, 25); + } + + { + s32 option_x = offset.X + 10; + s32 option_y = offset.Y; + u32 option_w = 220; + { + core::rect rect(0, 0, option_w, 30); + rect += topleft + v2s32(option_x, option_y); + Environment->addCheckBox(g_settings->getBool("doubletap_jump"), rect, this, + GUI_ID_CB_DOUBLETAP_JUMP, wgettext("Double tap \"jump\" to toggle fly")); + } + offset += v2s32(0, 25); } { @@ -197,6 +212,11 @@ bool GUIKeyChangeMenu::acceptInput() if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX) g_settings->setBool("aux1_descends", ((gui::IGUICheckBox*)e)->isChecked()); } + { + gui::IGUIElement *e = getElementFromId(GUI_ID_CB_DOUBLETAP_JUMP); + if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX) + g_settings->setBool("doubletap_jump", ((gui::IGUICheckBox*)e)->isChecked()); + } clearKeyCache(); return true; }