mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Merge pull request #2 from Laserlicht/disable_animation_button
disable animation button if large spellbook used
This commit is contained in:
commit
ef80b840e8
@ -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