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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user