// other
GUI_ID_CB_AUX1_DESCENDS,
GUI_ID_CB_DOUBLETAP_JUMP,
+ GUI_ID_CB_AUTOJUMP,
};
GUIKeyChangeMenu::GUIKeyChangeMenu(gui::IGUIEnvironment* env,
offset += v2s32(0, 25);
}
+ {
+ s32 option_x = offset.X;
+ s32 option_y = offset.Y + 5;
+ u32 option_w = 280;
+ {
+ core::rect<s32> rect(0, 0, option_w, 30);
+ rect += topleft + v2s32(option_x, option_y);
+ const wchar_t *text = wgettext("Automatic jumping");
+ Environment->addCheckBox(g_settings->getBool("autojump"), rect, this,
+ GUI_ID_CB_AUTOJUMP, text);
+ delete[] text;
+ }
+ offset += v2s32(0, 25);
+ }
+
{
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(size.X / 2 - 105, size.Y - 40);
{
gui::IGUIElement *e = getElementFromId(GUI_ID_CB_AUX1_DESCENDS);
- if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ if(e && 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)
+ if(e && e->getType() == gui::EGUIET_CHECK_BOX)
g_settings->setBool("doubletap_jump", ((gui::IGUICheckBox*)e)->isChecked());
}
+ {
+ gui::IGUIElement *e = getElementFromId(GUI_ID_CB_AUTOJUMP);
+ if(e && e->getType() == gui::EGUIET_CHECK_BOX)
+ g_settings->setBool("autojump", ((gui::IGUICheckBox*)e)->isChecked());
+ }
clearKeyCache();