mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
disable animation button
This commit is contained in:
parent
896f3108ee
commit
39c58a9d94
@ -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<CToggleButton> spellbookAnimationCheckbox = widget<CToggleButton>("spellbookAnimationCheckbox");
|
||||
if(value)
|
||||
spellbookAnimationCheckbox->disable();
|
||||
else
|
||||
spellbookAnimationCheckbox->enable();
|
||||
redraw();
|
||||
});
|
||||
|
||||
addCallback("audioMuteFocusChanged", [](bool value)
|
||||
@ -196,6 +202,10 @@ GeneralOptionsTab::GeneralOptionsTab()
|
||||
|
||||
std::shared_ptr<CToggleButton> spellbookAnimationCheckbox = widget<CToggleButton>("spellbookAnimationCheckbox");
|
||||
spellbookAnimationCheckbox->setSelected(settings["video"]["spellbookAnimation"].Bool());
|
||||
if(settings["gameTweaks"]["enableLargeSpellbook"].Bool())
|
||||
spellbookAnimationCheckbox->disable();
|
||||
else
|
||||
spellbookAnimationCheckbox->enable();
|
||||
|
||||
std::shared_ptr<CToggleButton> fullscreenBorderlessCheckbox = widget<CToggleButton>("fullscreenBorderlessCheckbox");
|
||||
if (fullscreenBorderlessCheckbox)
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user