1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

setting to disable subtitle

This commit is contained in:
Laserlicht
2025-03-10 00:04:44 +01:00
parent ee5cddb52c
commit 7af340e301
5 changed files with 41 additions and 10 deletions

View File

@@ -185,6 +185,11 @@ GeneralOptionsTab::GeneralOptionsTab()
setBoolSetting("general", "audioMuteFocus", value);
});
addCallback("enableSubtitleChanged", [](bool value)
{
setBoolSetting("general", "enableSubtitle", value);
});
//moved from "other" tab that is disabled for now to avoid excessible tabs with barely any content
addCallback("availableCreaturesAsDwellingChanged", [=](int value)
{
@@ -243,6 +248,10 @@ GeneralOptionsTab::GeneralOptionsTab()
if (audioMuteFocusCheckbox)
audioMuteFocusCheckbox->setSelected(settings["general"]["audioMuteFocus"].Bool());
std::shared_ptr<CToggleButton> enableSubtitleCheckbox = widget<CToggleButton>("enableSubtitleCheckbox");
if (enableSubtitleCheckbox)
enableSubtitleCheckbox->setSelected(settings["general"]["enableSubtitle"].Bool());
std::shared_ptr<CSlider> musicSlider = widget<CSlider>("musicSlider");
musicSlider->scrollTo(ENGINE->music().getVolume());