void OptionsGameMenu::callbackActive(Widget &widget) { if ((widget.getTag() == "CancelButton") || (widget.getTag() == "XButton")) { revertChanges(); _returnCode = 1; return; } if (widget.getTag() == "OkButton") { adoptChanges(); _returnCode = 2; return; } if (widget.getTag() == "PasswordButton") { sub(*_gorepass); return; } if (widget.getTag() == "FeedbackButton") { sub(*_feedback); return; } if (widget.getTag() == "DiffSlider") { updateDifficulty(dynamic_cast<WidgetSlider &>(widget).getState()); return; } }
void OptionsGameMenu::show() { _difficulty = CLIP(ConfigMan.getInt("difficulty", 0), 0, 2); getSlider("DiffSlider", true)->setState(_difficulty); updateDifficulty(_difficulty); GUI::show(); }
void OptionsGameplayMenu::displayConfig() { updateDifficulty(_difficulty); setCheckBoxState("CB_LEVELUP", _autoLevelUp); setCheckBoxState("CB_INVERTCAM", _mouseMove); setCheckBoxState("CB_AUTOSAVE", _autoSave); setCheckBoxState("CB_REVERSE", _reverseMinigameY); setCheckBoxState("CB_DISABLEMOVE", _combatMovement); }
void OptionsGameplayMenu::callbackActive(Widget &widget) { if (widget.getTag() == "BTN_DIFFRIGHT") { _difficulty++; if (_difficulty > 2) { _difficulty = 2; } updateDifficulty(_difficulty); return; } if (widget.getTag() == "BTN_DIFFLEFT") { _difficulty--; if (_difficulty < 0) { _difficulty = 0; } updateDifficulty(_difficulty); return; } if (widget.getTag() == "BTN_MOUSE") { sub(*_mousesettings); return; } if (widget.getTag() == "BTN_KEYMAP") { sub(*_keyboardconfiguration); return; } if (widget.getTag() == "BTN_DEFAULT") { _difficulty = 1; updateDifficulty(_difficulty); } if (widget.getTag() == "BTN_BACK") { _returnCode = 1; return; } }
void OptionsGameplayMenu::show() { GUI::show(); _difficulty = CLIP(ConfigMan.getInt("difficultylevel", 1), 0, 2); updateDifficulty(_difficulty); _autoLevelUp = ConfigMan.getBool("autolevelup", false); setCheckBoxState("CB_LEVELUP", _autoLevelUp); _mouseMove = ConfigMan.getBool("mousemove", false); setCheckBoxState("CB_INVERTCAM", _mouseMove); _autoSave = ConfigMan.getBool("autosave", true); setCheckBoxState("CB_AUTOSAVE", _autoSave); _reverseMinigameY = ConfigMan.getBool("reverseminigameyaxis", false); setCheckBoxState("CB_REVERSE", _reverseMinigameY); _combatMovement = ConfigMan.getBool("combatmovement", true); setCheckBoxState("CB_DISABLEMOVE", _combatMovement); }
void OptionsGameplayMenu::show() { GUI::show(); _difficulty = CLIP(ConfigMan.getInt("Difficulty Level", 0), 0, 2); updateDifficulty(_difficulty); }
void OptionsGameplayMenu::callbackActive(Widget &widget) { if (widget.getTag() == "BTN_DIFFRIGHT") { _difficulty++; if (_difficulty > 2) { _difficulty = 2; } updateDifficulty(_difficulty); return; } if (widget.getTag() == "BTN_DIFFLEFT") { _difficulty--; if (_difficulty < 0) { _difficulty = 0; } updateDifficulty(_difficulty); return; } if (widget.getTag() == "BTN_MOUSE") { adoptChanges(); sub(*_mousesettings); return; } if (widget.getTag() == "BTN_KEYMAP") { adoptChanges(); sub(*_keyboardconfiguration); return; } if (widget.getTag() == "BTN_DEFAULT") { _difficulty = 1; updateDifficulty(_difficulty); _autoLevelUp = false; setCheckBoxState("CB_LEVELUP", _autoLevelUp); _mouseMove = false; setCheckBoxState("CB_INVERTCAM", _mouseMove); _autoSave = true; setCheckBoxState("CB_AUTOSAVE", _autoSave); _reverseMinigameY = false; setCheckBoxState("CB_REVERSE", _reverseMinigameY); _combatMovement = true; setCheckBoxState("CB_DISABLEMOVE", _combatMovement); } if (widget.getTag() == "BTN_BACK") { _returnCode = 1; return; } if (widget.getTag() == "CB_LEVELUP") { _autoLevelUp = getCheckBoxState("CB_LEVELUP"); return; } if (widget.getTag() == "CB_INVERTCAM") { _mouseMove = getCheckBoxState("CB_INVERTCAM"); return; } if (widget.getTag() == "CB_AUTOSAVE") { _autoSave = getCheckBoxState("CB_AUTOSAVE"); return; } if (widget.getTag() == "CB_REVERSE") { _reverseMinigameY = getCheckBoxState("CB_REVERSE"); return; } if (widget.getTag() == "CB_DISABLEMOVE") { _combatMovement = getCheckBoxState("CB_DISABLEMOVE"); return; } }