diff --git a/client/windows/settings/GeneralOptionsTab.cpp b/client/windows/settings/GeneralOptionsTab.cpp index 82d455c3d..69ee10fef 100644 --- a/client/windows/settings/GeneralOptionsTab.cpp +++ b/client/windows/settings/GeneralOptionsTab.cpp @@ -162,9 +162,15 @@ GeneralOptionsTab::GeneralOptionsTab() setBoolSetting("general", "enableUiEnhancements", value); }); - addCallback("enableLargeSpellbookChanged", [](bool value) + addCallback("enableLargeSpellbookChanged", [this](bool value) { setBoolSetting("gameTweaks", "enableLargeSpellbook", value); + std::shared_ptr spellbookAnimationCheckbox = widget("spellbookAnimationCheckbox"); + if(value) + spellbookAnimationCheckbox->disable(); + else + spellbookAnimationCheckbox->enable(); + redraw(); }); addCallback("audioMuteFocusChanged", [](bool value) @@ -196,6 +202,10 @@ GeneralOptionsTab::GeneralOptionsTab() std::shared_ptr spellbookAnimationCheckbox = widget("spellbookAnimationCheckbox"); spellbookAnimationCheckbox->setSelected(settings["video"]["spellbookAnimation"].Bool()); + if(settings["gameTweaks"]["enableLargeSpellbook"].Bool()) + spellbookAnimationCheckbox->disable(); + else + spellbookAnimationCheckbox->enable(); std::shared_ptr fullscreenBorderlessCheckbox = widget("fullscreenBorderlessCheckbox"); if (fullscreenBorderlessCheckbox) diff --git a/config/widgets/settings/generalOptionsTab.json b/config/widgets/settings/generalOptionsTab.json index 42348177e..6a70d457e 100644 --- a/config/widgets/settings/generalOptionsTab.json +++ b/config/widgets/settings/generalOptionsTab.json @@ -70,6 +70,35 @@ } ] }, + { + "type" : "verticalLayout", + "customType" : "checkboxFake", + "position" : {"x": 10, "y": 83}, + "items" : [ + { + "created" : "desktop" + }, + {}, + { + "created" : "desktop" + }, + { + "created" : "desktop" + }, + {}, + {}, + { + "name": "spellbookAnimationCheckboxPlaceholder" + }, + { + "created" : "touchscreen" + }, + { + "created" : "mobile" + }, + {} + ] + }, { "type" : "verticalLayout", "customType" : "checkbox",