浏览代码

Merge pull request #2947 from Laserlicht/enableUiEnhancements_button

enableUiEnhancements button
Ivan Savenko 2 年之前
父节点
当前提交
efe3393408

+ 2 - 0
Mods/vcmi/config/vcmi/english.json

@@ -91,6 +91,8 @@
 	"vcmi.systemOptions.framerateButton.help"   : "{Show FPS}\n\nToggle the visibility of the Frames Per Second counter in the corner of the game window.",
 	"vcmi.systemOptions.hapticFeedbackButton.hover"  : "Haptic feedback",
 	"vcmi.systemOptions.hapticFeedbackButton.help"   : "{Haptic feedback}\n\nToggle the haptic feedback on touch inputs.",
+	"vcmi.systemOptions.enableUiEnhancementsButton.hover"  : "Interface Enhancements",
+	"vcmi.systemOptions.enableUiEnhancementsButton.help"   : "{Interface Enhancements}\n\nToggle various quality of life interface improvements. Such as a larger spell book, backpack, etc. Disable to have a more classic experience.",
 
 	"vcmi.adventureOptions.infoBarPick.hover" : "Show Messages in Info Panel",
 	"vcmi.adventureOptions.infoBarPick.help" : "{Show Messages in Info Panel}\n\nWhenever possible, game messages from visiting map objects will be shown in the info panel, instead of popping up in a separate window.",

+ 2 - 0
Mods/vcmi/config/vcmi/german.json

@@ -89,6 +89,8 @@
 	"vcmi.systemOptions.framerateButton.help"   : "{FPS anzeigen}\n\n Schaltet die Sichtbarkeit des Zählers für die Bilder pro Sekunde in der Ecke des Spielfensters um.",
 	"vcmi.systemOptions.hapticFeedbackButton.hover"  : "Haptisches Feedback",
 	"vcmi.systemOptions.hapticFeedbackButton.help"   : "{Haptisches Feedback}\n\nHaptisches Feedback bei Touch-Eingaben.",
+	"vcmi.systemOptions.enableUiEnhancementsButton.hover"  : "Interface Verbesserungen",
+	"vcmi.systemOptions.enableUiEnhancementsButton.help"   : "{Interface Verbesserungen}\n\nSchaltet verschiedene Interface Verbesserungen um. Wie z.B. ein größeres Zauberbuch, Rucksack, etc. Deaktivieren, um ein klassischeres Erlebnis zu haben.",
 
 	"vcmi.adventureOptions.infoBarPick.hover" : "Meldungen im Infobereich anzeigen",
 	"vcmi.adventureOptions.infoBarPick.help" : "{Meldungen im Infobereich anzeigen}\n\nWann immer möglich, werden Spielnachrichten von besuchten Kartenobjekten in der Infoleiste angezeigt, anstatt als Popup-Fenster zu erscheinen",

+ 8 - 0
client/windows/settings/GeneralOptionsTab.cpp

@@ -157,6 +157,10 @@ GeneralOptionsTab::GeneralOptionsTab()
 	{
 		setBoolSetting("general", "hapticFeedback", value);
 	});
+	addCallback("enableUiEnhancementsChanged", [](bool value)
+	{
+		setBoolSetting("general", "enableUiEnhancements", value);
+	});
 
 	//moved from "other" tab that is disabled for now to avoid excessible tabs with barely any content
 	addCallback("availableCreaturesAsDwellingChanged", [=](int value)
@@ -198,6 +202,10 @@ GeneralOptionsTab::GeneralOptionsTab()
 	if (hapticFeedbackCheckbox)
 		hapticFeedbackCheckbox->setSelected(settings["general"]["hapticFeedback"].Bool());
 
+	std::shared_ptr<CToggleButton> enableUiEnhancementsCheckbox = widget<CToggleButton>("enableUiEnhancementsCheckbox");
+	if (enableUiEnhancementsCheckbox)
+		enableUiEnhancementsCheckbox->setSelected(settings["general"]["enableUiEnhancements"].Bool());
+
 	std::shared_ptr<CSlider> musicSlider = widget<CSlider>("musicSlider");
 	musicSlider->scrollTo(CCS->musich->getVolume());
 

+ 14 - 6
config/widgets/settings/generalOptionsTab.json

@@ -7,7 +7,7 @@
 			"name": "lineLabelsEnd",
 			"type": "texture",
 			"image": "settingsWindow/lineHorizontal",
-			"rect": { "x" : 5, "y" : 289, "w": 365, "h": 3}
+			"rect": { "x" : 5, "y" : 349, "w": 365, "h": 3}
 		},
 		{
 			"type" : "labelTitle",
@@ -21,7 +21,7 @@
 		},
 		{
 			"type" : "labelTitle",
-			"position": {"x": 10, "y": 295},
+			"position": {"x": 10, "y": 355},
 			"text": "vcmi.systemOptions.townsGroup"
 		},
 /////////////////////////////////////// Left section - Video Settings
@@ -61,6 +61,9 @@
 				{
 					"text": "vcmi.systemOptions.hapticFeedbackButton.hover",
 					"created" : "mobile"
+				},
+				{
+					"text": "vcmi.systemOptions.enableUiEnhancementsButton.hover"
 				}
 			]
 		},
@@ -116,6 +119,11 @@
 					"help": "vcmi.systemOptions.hapticFeedbackButton",
 					"callback": "hapticFeedbackChanged",
 					"created" : "mobile"
+				},
+				{
+					"name": "enableUiEnhancementsCheckbox",
+					"help": "vcmi.systemOptions.enableUiEnhancementsButton",
+					"callback": "enableUiEnhancementsChanged"
 				}
 			]
 		},
@@ -168,7 +176,7 @@
 		{
 			"type" : "verticalLayout",
 			"customType" : "labelDescription",
-			"position": {"x": 45, "y": 325},
+			"position": {"x": 45, "y": 385},
 			"items" : [
 				{
 					"text": "vcmi.otherOptions.creatureGrowthAsDwellingLabel.hover",
@@ -181,7 +189,7 @@
 		{
 			"name": "availableCreaturesAsDwellingPicker",
 			"type": "toggleGroup",
-			"position": {"x": 10, "y": 323},
+			"position": {"x": 10, "y": 383},
 			"items":
 			[
 				{
@@ -203,7 +211,7 @@
 			"name": "compactTownCreatureInfoLabel",
 			"type" : "verticalLayout",
 			"customType" : "labelDescription",
-			"position": {"x": 45, "y": 385},
+			"position": {"x": 45, "y": 445},
 			"items" : [
 				{
 					"text": "vcmi.otherOptions.compactTownCreatureInfo.hover",
@@ -214,7 +222,7 @@
 			"name": "compactTownCreatureInfoCheckbox",
 			"type": "checkbox",
 			"help": "vcmi.otherOptions.compactTownCreatureInfo",
-			"position": {"x": 10, "y": 383},
+			"position": {"x": 10, "y": 443},
 			"callback": "compactTownCreatureInfoChanged"
 		}
 	]