Esempio n. 1
0
void OptionsGraphicsMenu::callbackActive(Widget &widget) {
	if (widget.getTag() == "BTN_ADVANCED") {
		adoptChanges();
		sub(*_advanced);
		return;
	}

	if (widget.getTag() == "BTN_RESOLUTION") {
		sub(*_resolution, kStartCodeNone, true, false);
		return;
	}

	if (widget.getTag() == "BTN_DEFAULT") {
		setDefault();
		displayConfig();
	}

	if (widget.getTag() == "BTN_BACK") {
		adoptChanges();
		_returnCode = 1;
		return;
	}

	if (widget.getTag() == "CB_SHADOWS") {
		_shadows = getCheckBoxState("CB_SHADOWS");
		return;
	}

	if (widget.getTag() == "CB_GRASS") {
		_grass = getCheckBoxState("CB_GRASS");
		return;
	}
}
Esempio n. 2
0
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;
	}
}
Esempio n. 3
0
void OptionsGraphicsAdvancedMenu::callbackActive(Widget &widget) {

	if (widget.getTag() == "BTN_TEXQUALRIGHT") {
		_textureQuality++;
		if (_textureQuality > 2) {
			_textureQuality = 2;
		}
		updateTextureQuality(_textureQuality);
		return;
	}

	if (widget.getTag() == "BTN_TEXQUALLEFT") {
		_textureQuality--;
		if (_textureQuality < 0) {
			_textureQuality = 0;
		}
		updateTextureQuality(_textureQuality);
		return;
	}

	if (widget.getTag() == "BTN_ANTIALIASRIGHT") {
		_antiAliasing++;
		if (_antiAliasing > 3) {
			_antiAliasing = 3;
		}
		updateAntiAliasing(_antiAliasing);
		return;
	}

	if (widget.getTag() == "BTN_ANTIALIASLEFT") {
		_antiAliasing--;
		if (_antiAliasing < 0) {
			_antiAliasing = 0;
		}
		updateAntiAliasing(_antiAliasing);
		return;
	}

	if (widget.getTag() == "BTN_ANISOTROPYRIGHT") {
		_anisotropy++;
		if (_anisotropy > 4) {
			_anisotropy = 4;
		}
		updateAnisotropy(_anisotropy);
		return;
	}

	if (widget.getTag() == "BTN_ANISOTROPYLEFT") {
		_anisotropy--;
		if (_anisotropy < 0) {
			_anisotropy = 0;
		}
		updateAnisotropy(_anisotropy);
		return;
	}

	if (widget.getTag() == "BTN_DEFAULT") {
		_textureQuality = 0;
		updateTextureQuality(_textureQuality);

		_antiAliasing = 0;
		updateAntiAliasing(_antiAliasing);

		_anisotropy = 0;
		updateAnisotropy(_anisotropy);

		_frameBufferEffects = true;
		setCheckBoxState("CB_FRAMEBUFF", _frameBufferEffects);

		_softShadows = true;
		setCheckBoxState("CB_SOFTSHADOWS", _softShadows);

		_vsync = false;
		setCheckBoxState("CB_VSYNC", _vsync);
	}

	if (widget.getTag() == "BTN_CANCEL") {
		_returnCode = 1;
		return;
	}

	if (widget.getTag() == "BTN_BACK") {
		adoptChanges();
		_returnCode = 1;
		return;
	}

	if (widget.getTag() == "CB_FRAMEBUFF") {
		_frameBufferEffects = getCheckBoxState("CB_FRAMEBUFF");
		return;
	}

	if (widget.getTag() == "CB_SOFTSHADOWS") {
		_softShadows = getCheckBoxState("CB_SOFTSHADOWS");
		return;
	}

	if (widget.getTag() == "CB_VSYNC") {
		_vsync = getCheckBoxState("CB_VSYNC");
		return;
	}
}