aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp9
-rw-r--r--gui/options.cpp160
-rw-r--r--gui/options.h21
-rw-r--r--gui/theme-config.cpp40
-rw-r--r--gui/themes/modern.ini40
5 files changed, 221 insertions, 49 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 92bc6b0fc8..a68a514b05 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -189,7 +189,9 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
_platformPopUp->appendEntry(p->description, p->id);
}
+ //
// 2) The 'Path' tab
+ //
tab->addTab("Paths");
// These buttons have to be extra wide, or the text will be truncated
@@ -230,6 +232,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
_globalAudioOverride = new CheckboxWidget(tab, "gameoptions_audioCheckbox", "Override global audio settings", kCmdGlobalAudioOverride, 0);
addAudioControls(tab, "gameoptions_");
+ addSubtitleControls(tab, "gameoptions_");
//
// 5) The MIDI tab
@@ -249,7 +252,6 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
addVolumeControls(tab, "gameoptions_");
-
// Activate the first tab
tab->setActiveTab(0);
@@ -271,7 +273,8 @@ void EditGameDialog::open() {
_globalGraphicsOverride->setState(e);
e = ConfMan.hasKey("music_driver", _domain) ||
- ConfMan.hasKey("subtitles", _domain);
+ ConfMan.hasKey("subtitles", _domain) ||
+ ConfMan.hasKey("talkspeed", _domain);
_globalAudioOverride->setState(e);
e = ConfMan.hasKey("multi_midi", _domain) ||
@@ -346,6 +349,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
break;
case kCmdGlobalAudioOverride:
setAudioSettingsState(data != 0);
+ setSubtitleSettingsState(data != 0);
draw();
break;
case kCmdGlobalMIDIOverride:
@@ -356,7 +360,6 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
setVolumeSettingsState(data != 0);
draw();
break;
-
case kCmdChooseSoundFontCmd: {
BrowserDialog browser("Select SoundFont", false);
diff --git a/gui/options.cpp b/gui/options.cpp
index 46128dad6f..1db3100081 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -55,11 +55,13 @@ namespace GUI {
// - music & graphics driver (but see also the comments on EditGameDialog
// for some techincal difficulties with this)
// - default volumes (sfx/speech/music)
-// - aspect ratio, language, platform, subtitles, debug mode/level, cd drive, joystick, multi midi, native mt32
+// - aspect ratio, language, platform, debug mode/level, cd drive, joystick, multi midi, native mt32
enum {
kMusicVolumeChanged = 'muvc',
kSfxVolumeChanged = 'sfvc',
+ kSubtitleToggle = 'sttg',
+ kSubtitleSpeedChanged = 'stsc',
kSpeechVolumeChanged = 'vcvc',
kChooseSoundFontCmd = 'chsf',
kChooseSaveDirCmd = 'chos',
@@ -83,6 +85,12 @@ OptionsDialog::OptionsDialog(const String &domain, String name)
init();
}
+const char *OptionsDialog::_subModeDesc[] = {
+ "Speech Only",
+ "Speech and Subtitles",
+ "Subtitles Only"
+};
+
void OptionsDialog::init() {
_enableGraphicSettings = false;
_gfxPopUp = 0;
@@ -90,19 +98,26 @@ void OptionsDialog::init() {
_fullscreenCheckbox = 0;
_aspectCheckbox = 0;
_enableAudioSettings = false;
- _subCheckbox = 0;
_midiPopUp = 0;
_enableMIDISettings = false;
_multiMidiCheckbox = 0;
_mt32Checkbox = 0;
_enableGSCheckbox = 0;
_enableVolumeSettings = false;
+ _musicVolumeDesc = 0;
_musicVolumeSlider = 0;
_musicVolumeLabel = 0;
+ _sfxVolumeDesc = 0;
_sfxVolumeSlider = 0;
_sfxVolumeLabel = 0;
+ _speechVolumeDesc = 0;
_speechVolumeSlider = 0;
_speechVolumeLabel = 0;
+ _subToggleDesc = 0;
+ _subToggleButton = 0;
+ _subSpeedDesc = 0;
+ _subSpeedSlider = 0;
+ _subSpeedLabel = 0;
}
void OptionsDialog::open() {
@@ -111,6 +126,7 @@ void OptionsDialog::open() {
// Reset result value
setResult(0);
+ // Graphic options
if (_fullscreenCheckbox) {
_gfxPopUp->setSelected(0);
@@ -150,7 +166,8 @@ void OptionsDialog::open() {
#endif
}
- if (_subCheckbox) {
+ // Audio options
+ if (_midiPopUp) {
// Music driver
const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
int i = 0;
@@ -163,9 +180,6 @@ void OptionsDialog::open() {
md++;
}
_midiPopUp->setSelected(md->name ? i : 0);
-
- // Subtitles setting
- _subCheckbox->setState(ConfMan.getBool("subtitles", _domain));
}
if (_multiMidiCheckbox) {
@@ -202,10 +216,27 @@ void OptionsDialog::open() {
_speechVolumeSlider->setValue(vol);
_speechVolumeLabel->setValue(vol);
}
+
+ // Subtitle options
+ if (_subToggleButton) {
+ int speed;
+ int sliderMaxValue = _subSpeedSlider->getMaxValue();
+
+ _subMode = getSubtitleMode(ConfMan.getBool("subtitles", _domain), ConfMan.getBool("speech_mute"));
+ _subToggleButton->setLabel(_subModeDesc[_subMode]);
+
+ // Engines that reuse the subtitle speed widget set their own max value.
+ // Scale the config value accordingly (see addSubtitleControls)
+ speed = (ConfMan.getInt("talkspeed", _domain) * sliderMaxValue + 255 / 2) / 255;
+ _subSpeedSlider->setValue(speed);
+ _subSpeedLabel->setValue(speed);
+ }
}
void OptionsDialog::close() {
if (getResult()) {
+
+ // Graphic options
if (_fullscreenCheckbox) {
if (_enableGraphicSettings) {
ConfMan.setBool("fullscreen", _fullscreenCheckbox->getState(), _domain);
@@ -224,6 +255,7 @@ void OptionsDialog::close() {
}
}
+ // Volume options
if (_musicVolumeSlider) {
if (_enableVolumeSettings) {
ConfMan.setInt("music_volume", _musicVolumeSlider->getValue(), _domain);
@@ -236,9 +268,9 @@ void OptionsDialog::close() {
}
}
- if (_subCheckbox) {
+ // Audio options
+ if (_midiPopUp) {
if (_enableAudioSettings) {
- ConfMan.setBool("subtitles", _subCheckbox->getState(), _domain);
const MidiDriverDescription *md = MidiDriver::getAvailableMidiDrivers();
while (md->name && md->id != (int)_midiPopUp->getSelectedTag())
md++;
@@ -248,7 +280,6 @@ void OptionsDialog::close() {
ConfMan.removeKey("music_driver", _domain);
} else {
ConfMan.removeKey("music_driver", _domain);
- ConfMan.removeKey("subtitles", _domain);
}
}
@@ -270,6 +301,42 @@ void OptionsDialog::close() {
}
}
+ // Subtitle options
+ if (_subToggleButton) {
+ if (_enableSubtitleSettings) {
+ bool subtitles, speech_mute;
+ int talkspeed;
+ int sliderMaxValue = _subSpeedSlider->getMaxValue();
+
+ switch (_subMode) {
+ case 0:
+ subtitles = speech_mute = false;
+ break;
+ case 1:
+ subtitles = true;
+ speech_mute = false;
+ break;
+ case 2:
+ default:
+ subtitles = speech_mute = true;
+ break;
+ }
+
+ ConfMan.setBool("subtitles", subtitles, _domain);
+ ConfMan.setBool("speech_mute", speech_mute, _domain);
+
+ // Engines that reuse the subtitle speed widget set their own max value.
+ // Scale the config value accordingly (see addSubtitleControls)
+ talkspeed = (_subSpeedSlider->getValue() * 255 + sliderMaxValue / 2) / sliderMaxValue;
+ ConfMan.setInt("talkspeed", talkspeed, _domain);
+
+ } else {
+ ConfMan.removeKey("subtitles", _domain);
+ ConfMan.removeKey("talkspeed", _domain);
+ ConfMan.removeKey("speech_mute", _domain);
+ }
+ }
+
// Save config file
ConfMan.flushToDisk();
}
@@ -291,6 +358,22 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
_speechVolumeLabel->setValue(_speechVolumeSlider->getValue());
_speechVolumeLabel->draw();
break;
+ case kSubtitleToggle:
+ if (_subMode < 2)
+ _subMode++;
+ else
+ _subMode = 0;
+
+ _subToggleButton->setLabel(_subModeDesc[_subMode]);
+ _subToggleButton->draw();
+ _subSpeedDesc->draw();
+ _subSpeedSlider->draw();
+ _subSpeedLabel->draw();
+ break;
+ case kSubtitleSpeedChanged:
+ _subSpeedLabel->setValue(_subSpeedSlider->getValue());
+ _subSpeedLabel->draw();
+ break;
case kOKCmd:
setResult(1);
close();
@@ -315,7 +398,6 @@ void OptionsDialog::setAudioSettingsState(bool enabled) {
_enableAudioSettings = enabled;
_midiPopUp->setEnabled(enabled);
- _subCheckbox->setEnabled(enabled);
}
void OptionsDialog::setMIDISettingsState(bool enabled) {
@@ -331,14 +413,27 @@ void OptionsDialog::setMIDISettingsState(bool enabled) {
void OptionsDialog::setVolumeSettingsState(bool enabled) {
_enableVolumeSettings = enabled;
+ _musicVolumeDesc->setEnabled(enabled);
_musicVolumeSlider->setEnabled(enabled);
_musicVolumeLabel->setEnabled(enabled);
+ _sfxVolumeDesc->setEnabled(enabled);
_sfxVolumeSlider->setEnabled(enabled);
_sfxVolumeLabel->setEnabled(enabled);
+ _speechVolumeDesc->setEnabled(enabled);
_speechVolumeSlider->setEnabled(enabled);
_speechVolumeLabel->setEnabled(enabled);
}
+void OptionsDialog::setSubtitleSettingsState(bool enabled) {
+ _enableSubtitleSettings = enabled;
+
+ _subToggleButton->setEnabled(enabled);
+ _subToggleDesc->setEnabled(enabled);
+ _subSpeedDesc->setEnabled(enabled);
+ _subSpeedSlider->setEnabled(enabled);
+ _subSpeedLabel->setEnabled(enabled);
+}
+
void OptionsDialog::addGraphicControls(GuiObject *boss, String prefix) {
const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
@@ -391,9 +486,6 @@ void OptionsDialog::addAudioControls(GuiObject *boss, String prefix) {
md++;
}
- // Subtitles on/off
- _subCheckbox = new CheckboxWidget(boss, prefix + "auSubtitlesCheckbox", "Display subtitles", 0, 0);
-
_enableAudioSettings = true;
}
@@ -414,29 +506,41 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, String prefix) {
_enableMIDISettings = true;
}
+// The function has an extra slider range parameter, since both the launcher and SCUMM engine
+// make use of the widgets. The launcher range is 0-255. SCUMM's 0-9
+void OptionsDialog::addSubtitleControls(GuiObject *boss, String prefix, int maxSliderVal) {
+
+ _subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", "Text and Speech:");
+ _subToggleButton = new ButtonWidget(boss, prefix + "subToggleButton", "", kSubtitleToggle, 0);
+
+ // Subtitle speed
+ _subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", "Subtitle speed:");
+ _subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", kSubtitleSpeedChanged);
+ _subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", "100%");
+ _subSpeedSlider->setMinValue(0); _subSpeedSlider->setMaxValue(maxSliderVal);
+ _subSpeedLabel->setFlags(WIDGET_CLEARBG);
+
+ _enableSubtitleSettings = true;
+}
+
void OptionsDialog::addVolumeControls(GuiObject *boss, String prefix) {
- const char *slider_labels[] = {
- "Music volume:",
- "SFX volume:",
- "Speech volume:"
- };
// Volume controllers
- new StaticTextWidget(boss, prefix + "vcMusicText", slider_labels[0]);
+ _musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", "Music volume:");
_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", kMusicVolumeChanged);
_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", "100%");
_musicVolumeSlider->setMinValue(0);
_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
- new StaticTextWidget(boss, prefix + "vcSfxText", slider_labels[1]);
+ _sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", "SFX volume:");
_sfxVolumeSlider = new SliderWidget(boss, prefix + "vcSfxSlider", kSfxVolumeChanged);
_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", "100%");
_sfxVolumeSlider->setMinValue(0);
_sfxVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
_sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
- new StaticTextWidget(boss, prefix + "vcSpeechText" , slider_labels[2]);
+ _speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , "Speech volume:");
_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", kSpeechVolumeChanged);
_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", "100%");
_speechVolumeSlider->setMinValue(0);
@@ -446,6 +550,18 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, String prefix) {
_enableVolumeSettings = true;
}
+int OptionsDialog::getSubtitleMode(bool subtitles, bool speech_mute) {
+ if (!subtitles && !speech_mute) // Speech only
+ return 0;
+ else if (subtitles && !speech_mute) // Speech and subtitles
+ return 1;
+ else if (subtitles && speech_mute) // Subtitles only
+ return 2;
+ else
+ warning("Wrong configuration: Both subtitles and speech are off. Assuming subtitles only");
+ return 2;
+}
+
void OptionsDialog::handleScreenChanged() {
Dialog::handleScreenChanged();
@@ -481,6 +597,8 @@ GlobalOptionsDialog::GlobalOptionsDialog()
tab->addTab("Audio");
addAudioControls(tab, "globaloptions_");
addVolumeControls(tab, "globaloptions_");
+ addSubtitleControls(tab, "globaloptions_");
+
// TODO: cd drive setting
//
diff --git a/gui/options.h b/gui/options.h
index 343aae33af..aca2f39a47 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -66,11 +66,15 @@ protected:
void addAudioControls(GuiObject *boss, String prefix);
void addMIDIControls(GuiObject *boss, String prefix);
void addVolumeControls(GuiObject *boss, String prefix);
+ // The default value is the launcher's non-scaled talkspeed value. When SCUMM uses the widget,
+ // it uses its own scale
+ void addSubtitleControls(GuiObject *boss, String prefix, int maxSliderVal = 255);
void setGraphicSettingsState(bool enabled);
void setAudioSettingsState(bool enabled);
void setMIDISettingsState(bool enabled);
void setVolumeSettingsState(bool enabled);
+ void setSubtitleSettingsState(bool enabled);
private:
//
@@ -87,7 +91,6 @@ private:
//
bool _enableAudioSettings;
PopUpWidget *_midiPopUp;
- CheckboxWidget *_subCheckbox;
//
// MIDI controls
@@ -96,18 +99,34 @@ private:
CheckboxWidget *_multiMidiCheckbox;
CheckboxWidget *_mt32Checkbox;
CheckboxWidget *_enableGSCheckbox;
+
+ //
+ // Subtitle controls
+ //
+ int getSubtitleMode(bool subtitles, bool speech_mute);
+ bool _enableSubtitleSettings;
+ StaticTextWidget *_subToggleDesc;
+ ButtonWidget *_subToggleButton;
+ int _subMode;
+ static const char *_subModeDesc[];
+ StaticTextWidget *_subSpeedDesc;
+ SliderWidget *_subSpeedSlider;
+ StaticTextWidget *_subSpeedLabel;
//
// Volume controls
//
bool _enableVolumeSettings;
+ StaticTextWidget *_musicVolumeDesc;
SliderWidget *_musicVolumeSlider;
StaticTextWidget *_musicVolumeLabel;
+ StaticTextWidget *_sfxVolumeDesc;
SliderWidget *_sfxVolumeSlider;
StaticTextWidget *_sfxVolumeLabel;
+ StaticTextWidget *_speechVolumeDesc;
SliderWidget *_speechVolumeSlider;
StaticTextWidget *_speechVolumeLabel;
};
diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp
index 708a84ba09..c9c83c7dbc 100644
--- a/gui/theme-config.cpp
+++ b/gui/theme-config.cpp
@@ -50,6 +50,7 @@ const char *Theme::_defaultConfigINI =
"def_scummhelpX=5\n"
"def_scummhelpW=(w - 2 * 5)\n"
"def_midiControlsSpacing=1\n"
+"def_vcAudioTabIndent=0\n"
"use=XxY\n"
"# Scumm Saveload dialog\n"
"scummsaveload=8 8 (w - 2 * 8) (h - 16)\n"
@@ -85,6 +86,7 @@ const char *Theme::_defaultConfigINI =
"def_scummhelpW=370\n"
"def_scummhelpX=((w - scummhelpW) / 2)\n"
"def_midiControlsSpacing=2\n"
+"def_vcAudioTabIndent=10\n"
"##### Widgets config\n"
"ListWidget.leftPadding=4\n"
"ListWidget.rightPadding=0\n"
@@ -141,12 +143,14 @@ const char *Theme::_defaultConfigINI =
"\n"
"# graphics tab\n"
"opYoffset=vBorder\n"
+"opXoffset=0\n"
"useWithPrefix=graphicsControls globaloptions_\n"
"\n"
"# audio tab\n"
"opYoffset=vBorder\n"
"useWithPrefix=audioControls globaloptions_\n"
"useWithPrefix=volumeControls globaloptions_\n"
+"useWithPrefix=subtitleControls globaloptions_\n"
"\n"
"# MIDI tab\n"
"opYoffset=vBorder\n"
@@ -205,6 +209,7 @@ const char *Theme::_defaultConfigINI =
"\n"
"# graphics tab\n"
"opYoffset=vBorder\n"
+"opXoffset=gox\n"
"gameoptions_graphicsCheckbox=gox opYoffset (kFontHeight + 10 + 192) buttonHeight\n"
"opYoffset=(opYoffset + buttonHeight)\n"
"useWithPrefix=graphicsControls gameoptions_\n"
@@ -214,6 +219,7 @@ const char *Theme::_defaultConfigINI =
"gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight\n"
"opYoffset=(opYoffset + buttonHeight)\n"
"useWithPrefix=audioControls gameoptions_\n"
+"useWithPrefix=subtitleControls gameoptions_\n"
"\n"
"# midi tab\n"
"opYoffset=vBorder\n"
@@ -251,9 +257,8 @@ const char *Theme::_defaultConfigINI =
"# hence it is on the end of the list\n"
"opYoffset=8\n"
"useWithPrefix=volumeControls scummconfig_\n"
-"scummconfig_subtitlesCheckbox=15 opYoffset (kFontHeight + 10 + 89) buttonHeight\n"
+"useWithPrefix=subtitleControls scummconfig_\n"
"opYoffset=(opYoffset + buttonHeight)\n"
-"scummconfig_speechCheckbox=prev.x opYoffset (kFontHeight + 10 + 85) buttonHeight\n"
"opYoffset=(opYoffset + buttonHeight + 4)\n"
"soWidth=(8 + 3 * buttonWidth + 4)\n"
"scummconfig_keys=(soWidth - 3 * (buttonWidth + 4) + 6) opYoffset (buttonWidth - 10) buttonHeight\n"
@@ -299,7 +304,6 @@ const char *Theme::_defaultConfigINI =
"chooser_cancel=(chooserW - 2 * (buttonWidth + 10)) (opHeight - buttonHeight - 8) buttonWidth buttonHeight\n"
"chooser_ok=(prev.x2 + 10) prev.y prev.w prev.h\n"
"\n"
-"\n"
"[graphicsControls]\n"
"gcx=10\n"
"gcw=(parent.w - 2 * 10)\n"
@@ -316,24 +320,23 @@ const char *Theme::_defaultConfigINI =
"aux=10\n"
"auw=(parent.w - 2 * 10)\n"
"auMidiPopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)\n"
-"opYoffset=(opYoffset + kLineHeight + 4)\n"
-"auSubtitlesCheckbox=aux opYoffset (kFontHeight + 10 + 102) buttonHeight\n"
-"opYoffset=(opYoffset + buttonHeight + 18)\n"
+"opYoffset=(opYoffset + buttonHeight + 4)\n"
"\n"
"[volumeControls]\n"
-"vctextw=95\n"
-"vcxoff=(vctextw + 15)\n"
-"vcMusicText=10 (opYoffset + 2) vctextw kLineHeight\n"
+"vctextw=(95 + vcAudioTabIndent)\n"
+"vcxoff=(opXoffset + vctextw + 15)\n"
+"vcx=(opXoffset + 10)\n"
+"vcMusicText=vcx (opYoffset + 2) vctextw kLineHeight\n"
"vcMusicText.align=kTextAlignRight\n"
"vcMusicSlider=vcxoff opYoffset sliderWidth sliderHeight\n"
"vcMusicLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight\n"
"opYoffset=(opYoffset + sliderHeight + 4)\n"
-"vcSfxText=10 (opYoffset + 2) vctextw kLineHeight\n"
+"vcSfxText=vcx (opYoffset + 2) vctextw kLineHeight\n"
"vcSfxText.align=kTextAlignRight\n"
"vcSfxSlider=vcxoff opYoffset sliderWidth sliderHeight\n"
"vcSfxLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight\n"
"opYoffset=(opYoffset + sliderHeight + 4)\n"
-"vcSpeechText=10 (opYoffset + 2) vctextw kLineHeight\n"
+"vcSpeechText=vcx (opYoffset + 2) vctextw kLineHeight\n"
"vcSpeechText.align=kTextAlignRight\n"
"vcSpeechSlider=vcxoff opYoffset sliderWidth sliderHeight\n"
"vcSpeechLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight\n"
@@ -351,6 +354,21 @@ const char *Theme::_defaultConfigINI =
"mcGSCheckbox=mcx opYoffset (kFontHeight + 10 + 142) buttonHeight\n"
"opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)\n"
"\n"
+"[subtitleControls]\n"
+"sbx=(opXoffset + 10)\n"
+"sbYoff=(buttonHeight / 8)\n"
+"sbOff=((sliderHeight - kLineHeight) / 2 + 2)\n"
+"sbtextw=(100 + vcAudioTabIndent)\n"
+"opYoffset=(opYoffset + sbYoff)\n"
+"subToggleDesc=sbx (opYoffset + sbYoff) sbtextw buttonHeight\n"
+"subToggleButton=prev.x2 (opYoffset - sbYoff) (buttonWidth + 54) buttonHeight\n"
+"opYoffset=(opYoffset + buttonHeight + 6)\n"
+"subSubtitleSpeedDesc=sbx (opYoffset + sbOff) sbtextw kLineHeight\n"
+"subSubtitleSpeedDesc.align=kTextAlignRight\n"
+"subSubtitleSpeedSlider=prev.x2 opYoffset sliderWidth sliderHeight\n"
+"subSubtitleSpeedLabel=(prev.x2 + 10) (opYoffset + sbOff) 24 kLineHeight\n"
+"opYoffset=(opYoffset + sliderHeight + 8)\n"
+"\n"
"[scummmain]\n"
"## Main dialog\n"
"# note that scummmain size depends on overall height\n"
diff --git a/gui/themes/modern.ini b/gui/themes/modern.ini
index 0bc67b7edb..6c6e5d51b4 100644
--- a/gui/themes/modern.ini
+++ b/gui/themes/modern.ini
@@ -234,6 +234,7 @@ useWithPrefix=graphicsControls globaloptions_
opYoffset=vBorder
useWithPrefix=audioControls globaloptions_
useWithPrefix=volumeControls globaloptions_
+useWithPrefix=subtitleControls globaloptions_
# MIDI tab
opYoffset=vBorder
@@ -302,6 +303,7 @@ opYoffset=vBorder
gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
opYoffset=(opYoffset + buttonHeight + 6)
useWithPrefix=audioControls gameoptions_
+useWithPrefix=subtitleControls gameoptions_
# midi tab
opYoffset=vBorder
@@ -341,9 +343,8 @@ use=scummmain
# hence it is on the end of the list
opYoffset=8
useWithPrefix=volumeControls scummconfig_
-scummconfig_subtitlesCheckbox=15 opYoffset (kFontHeight + 10 + 89) buttonHeight
+useWithPrefix=subtitleControls scummconfig_
opYoffset=(opYoffset + buttonHeight)
-scummconfig_speechCheckbox=prev.x opYoffset (kFontHeight + 10 + 85) buttonHeight
opYoffset=(opYoffset + buttonHeight + 4)
soWidth=(8 + 3 * buttonWidth + 4)
scummconfig_keys=(soWidth - 3 * (buttonWidth + 4) + 6) opYoffset (buttonWidth - 10) buttonHeight
@@ -389,7 +390,6 @@ chooser_list=10 (6 + kLineHeight + 2) prev.w (opHeight - self.y - buttonHeight -
chooser_cancel=(chooserW - 2 * (buttonWidth + 10)) (opHeight - buttonHeight - 8) buttonWidth buttonHeight
chooser_ok=(prev.x2 + 10) prev.y prev.w prev.h
-
[graphicsControls]
gcx=(opXoffset + 10)
gcw=(parent.w - gcx - 25)
@@ -404,26 +404,25 @@ opYoffset=(opYoffset + buttonHeight + 4)
[audioControls]
aux=(opXoffset + 10)
-auw=(parent.w - aux - 25)
-auMidiPopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)
-opYoffset=(opYoffset + kLineHeight + 16)
-auSubtitlesCheckbox=aux opYoffset (kFontHeight + 10 + 102) buttonHeight
-opYoffset=(opYoffset + buttonHeight + 18)
+auw=(parent.w - aux - 30)
+auMidiPopup=(aux) (opYoffset - 1) (auw + 5) (kLineHeight + 2)
+opYoffset=(opYoffset + buttonHeight + 4)
[volumeControls]
-vctextw=95
-vcxoff=(vctextw + 15)
-vcMusicText=10 (opYoffset + 2) vctextw kLineHeight
+vctextw=110
+vcxoff=(opXoffset + vctextw + 10)
+vcx=(opXoffset + 10)
+vcMusicText=vcx (opYoffset + 2) vctextw kLineHeight
vcMusicText.align=kTextAlignRight
vcMusicSlider=vcxoff opYoffset sliderWidth sliderHeight
vcMusicLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight
opYoffset=(opYoffset + sliderHeight + 8)
-vcSfxText=10 (opYoffset + 2) vctextw kLineHeight
+vcSfxText=vcx (opYoffset + 2) vctextw kLineHeight
vcSfxText.align=kTextAlignRight
vcSfxSlider=vcxoff opYoffset sliderWidth sliderHeight
vcSfxLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight
opYoffset=(opYoffset + sliderHeight + 8)
-vcSpeechText=10 (opYoffset + 2) vctextw kLineHeight
+vcSpeechText=vcx (opYoffset + 2) vctextw kLineHeight
vcSpeechText.align=kTextAlignRight
vcSpeechSlider=vcxoff opYoffset sliderWidth sliderHeight
vcSpeechLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight
@@ -442,6 +441,21 @@ opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)
mcGSCheckbox=mcx opYoffset (kFontHeight + 10 + 142) buttonHeight
opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)
+[subtitleControls]
+sbx=(opXoffset + 10)
+sbtextw=110
+sbYoff=(buttonHeight / 8)
+sbOff=((sliderHeight - kLineHeight) / 2)
+opYoffset=(opYoffset + sbYoff)
+subToggleDesc=sbx (opYoffset + sbYoff) sbtextw buttonHeight
+subToggleButton=prev.x2 opYoffset (buttonWidth + 34) sliderHeight
+opYoffset=(opYoffset + buttonHeight + 6)
+subSubtitleSpeedDesc=sbx (opYoffset + sbOff) sbtextw kLineHeight
+subSubtitleSpeedDesc.align=kTextAlignRight
+subSubtitleSpeedSlider=prev.x2 opYoffset sliderWidth sliderHeight
+subSubtitleSpeedLabel=(prev.x2 + 10) (opYoffset + sbOff) 24 kLineHeight
+opYoffset=(opYoffset + sliderHeight + 8)
+
[scummmain]
## Main dialog
# note that scummmain size depends on overall height