mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
ALL: add support for --subtitles
This commit is contained in:
committed by
Eugene Sandulenko
parent
7f1eafcb2f
commit
d6dbf721b6
@@ -1893,6 +1893,9 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo
|
||||
if (settings.contains("talkspeed")) {
|
||||
ConfMan.set("talkspeed", settings["talkspeed"], Common::ConfigManager::kSessionDomain);
|
||||
}
|
||||
if (settings.contains("subtitles")) {
|
||||
ConfMan.set("subtitles", settings["subtitles"], Common::ConfigManager::kSessionDomain);
|
||||
}
|
||||
|
||||
// Finally, store the command line settings into the config manager.
|
||||
for (Common::StringMap::const_iterator x = settings.begin(); x != settings.end(); ++x) {
|
||||
|
||||
+8
-2
@@ -886,8 +886,8 @@ void OptionsDialog::apply() {
|
||||
ConfMan.removeKey("opl_driver", _domain);
|
||||
}
|
||||
} else {
|
||||
ConfMan.removeKey("opl_driver", _domain);
|
||||
_oplPopUpDesc->setFontColor(ThemeEngine::FontColor::kFontColorNormal);
|
||||
ConfMan.removeKey("opl_driver", _domain);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -965,10 +965,14 @@ void OptionsDialog::apply() {
|
||||
break;
|
||||
}
|
||||
|
||||
ConfMan.setBool("subtitles", subtitles, _domain);
|
||||
if (subtitles != ConfMan.getBool("subtitles")) {
|
||||
ConfMan.setBool("subtitles", subtitles, _domain);
|
||||
_subToggleDesc->setFontColor(ThemeEngine::FontColor::kFontColorNormal);
|
||||
}
|
||||
ConfMan.setBool("speech_mute", speech_mute, _domain);
|
||||
} else if (!_domain.empty()) {
|
||||
ConfMan.removeKey("subtitles", _domain);
|
||||
_subToggleDesc->setFontColor(ThemeEngine::FontColor::kFontColorNormal);
|
||||
ConfMan.removeKey("speech_mute", _domain);
|
||||
}
|
||||
|
||||
@@ -1722,6 +1726,8 @@ void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &p
|
||||
|
||||
if (ConfMan.isKeyTemporary("talkspeed"))
|
||||
_subSpeedDesc->setFontColor(ThemeEngine::FontColor::kFontColorOverride);
|
||||
if (ConfMan.isKeyTemporary("subtitles"))
|
||||
_subToggleDesc->setFontColor(ThemeEngine::FontColor::kFontColorOverride);
|
||||
|
||||
// Subtitle speed
|
||||
_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", Common::U32String(), kSubtitleSpeedChanged);
|
||||
|
||||
Reference in New Issue
Block a user