From 5061792cce8f135f28d04991548d59aa8a241587 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:11:08 +0200 Subject: [PATCH 1/4] enableUiEnhancements button --- Mods/vcmi/config/vcmi/english.json | 2 ++ Mods/vcmi/config/vcmi/german.json | 2 ++ client/windows/settings/GeneralOptionsTab.cpp | 8 ++++++++ config/widgets/settings/generalOptionsTab.json | 8 ++++++++ 4 files changed, 20 insertions(+) diff --git a/Mods/vcmi/config/vcmi/english.json b/Mods/vcmi/config/vcmi/english.json index cc95f3e30..bbe29be80 100644 --- a/Mods/vcmi/config/vcmi/english.json +++ b/Mods/vcmi/config/vcmi/english.json @@ -90,6 +90,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.", "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.", diff --git a/Mods/vcmi/config/vcmi/german.json b/Mods/vcmi/config/vcmi/german.json index 926501565..067594e7d 100644 --- a/Mods/vcmi/config/vcmi/german.json +++ b/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.", "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", diff --git a/client/windows/settings/GeneralOptionsTab.cpp b/client/windows/settings/GeneralOptionsTab.cpp index 2851873bc..f32d568f8 100644 --- a/client/windows/settings/GeneralOptionsTab.cpp +++ b/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 enableUiEnhancementsCheckbox = widget("enableUiEnhancementsCheckbox"); + if (enableUiEnhancementsCheckbox) + enableUiEnhancementsCheckbox->setSelected(settings["general"]["enableUiEnhancements"].Bool()); + std::shared_ptr musicSlider = widget("musicSlider"); musicSlider->scrollTo(CCS->musich->getVolume()); diff --git a/config/widgets/settings/generalOptionsTab.json b/config/widgets/settings/generalOptionsTab.json index f8a5a4602..cd808eafe 100644 --- a/config/widgets/settings/generalOptionsTab.json +++ b/config/widgets/settings/generalOptionsTab.json @@ -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" } ] }, From d40eb03d5b01068422bbf84eb0c4303f7eecf85f Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:44:35 +0200 Subject: [PATCH 2/4] description --- Mods/vcmi/config/vcmi/english.json | 2 +- Mods/vcmi/config/vcmi/german.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mods/vcmi/config/vcmi/english.json b/Mods/vcmi/config/vcmi/english.json index bbe29be80..1ce9f4b5f 100644 --- a/Mods/vcmi/config/vcmi/english.json +++ b/Mods/vcmi/config/vcmi/english.json @@ -91,7 +91,7 @@ "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.", + "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.", diff --git a/Mods/vcmi/config/vcmi/german.json b/Mods/vcmi/config/vcmi/german.json index 067594e7d..47ca4d50b 100644 --- a/Mods/vcmi/config/vcmi/german.json +++ b/Mods/vcmi/config/vcmi/german.json @@ -90,7 +90,7 @@ "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.", + "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", From 012f4b91b2e207de48a6e444c47af41056aeb868 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Tue, 26 Sep 2023 20:43:47 +0200 Subject: [PATCH 3/4] Update generalOptionsTab.json --- config/widgets/settings/generalOptionsTab.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/widgets/settings/generalOptionsTab.json b/config/widgets/settings/generalOptionsTab.json index cd808eafe..22dc40fcb 100644 --- a/config/widgets/settings/generalOptionsTab.json +++ b/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" : 319, "w": 365, "h": 3} }, { "type" : "labelTitle", @@ -176,7 +176,7 @@ { "type" : "verticalLayout", "customType" : "labelDescription", - "position": {"x": 45, "y": 325}, + "position": {"x": 45, "y": 355}, "items" : [ { "text": "vcmi.otherOptions.creatureGrowthAsDwellingLabel.hover", From bb358148d8fb9a409144455be067b09aa160b530 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Tue, 26 Sep 2023 20:58:24 +0200 Subject: [PATCH 4/4] Update generalOptionsTab.json --- config/widgets/settings/generalOptionsTab.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/widgets/settings/generalOptionsTab.json b/config/widgets/settings/generalOptionsTab.json index 22dc40fcb..e34131c6a 100644 --- a/config/widgets/settings/generalOptionsTab.json +++ b/config/widgets/settings/generalOptionsTab.json @@ -7,7 +7,7 @@ "name": "lineLabelsEnd", "type": "texture", "image": "settingsWindow/lineHorizontal", - "rect": { "x" : 5, "y" : 319, "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 @@ -176,7 +176,7 @@ { "type" : "verticalLayout", "customType" : "labelDescription", - "position": {"x": 45, "y": 355}, + "position": {"x": 45, "y": 385}, "items" : [ { "text": "vcmi.otherOptions.creatureGrowthAsDwellingLabel.hover", @@ -189,7 +189,7 @@ { "name": "availableCreaturesAsDwellingPicker", "type": "toggleGroup", - "position": {"x": 10, "y": 323}, + "position": {"x": 10, "y": 383}, "items": [ { @@ -211,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", @@ -222,7 +222,7 @@ "name": "compactTownCreatureInfoCheckbox", "type": "checkbox", "help": "vcmi.otherOptions.compactTownCreatureInfo", - "position": {"x": 10, "y": 383}, + "position": {"x": 10, "y": 443}, "callback": "compactTownCreatureInfoChanged" } ]