From 63afd5fe0c29b79bf8d07a84c7051672ed49d995 Mon Sep 17 00:00:00 2001 From: James Brown Date: Sat, 17 Jan 2004 13:21:15 +0000 Subject: [PATCH] Launcher subtitles checkbox (is Sound the right place for this? I dunno..) svn-id: r12454 --- gui/options.cpp | 13 +++++++++++-- gui/options.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gui/options.cpp b/gui/options.cpp index 34866b50ee8..3479284ef59 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -58,7 +58,7 @@ OptionsDialog::OptionsDialog(const String &domain, int x, int y, int w, int h) _enableGraphicSettings(false), _gfxPopUp(0), _fullscreenCheckbox(0), _aspectCheckbox(0), _enableAudioSettings(false), - _multiMidiCheckbox(0), _mt32Checkbox(0), + _multiMidiCheckbox(0), _mt32Checkbox(0), _subCheckbox(0), _enableVolumeSettings(false), _masterVolumeSlider(0), _masterVolumeLabel(0), _musicVolumeSlider(0), _musicVolumeLabel(0), @@ -120,6 +120,9 @@ void OptionsDialog::open() { // Native mt32 setting _mt32Checkbox->setState(ConfMan.getBool("native_mt32", _domain)); + + // Subtitles setting + _subCheckbox->setState(ConfMan.getBool("subtitles", _domain)); } if (_masterVolumeSlider) { @@ -171,7 +174,7 @@ void OptionsDialog::close() { if (_enableAudioSettings) { ConfMan.set("multi_midi", _multiMidiCheckbox->getState(), _domain); ConfMan.set("native_mt32", _mt32Checkbox->getState(), _domain); - + ConfMan.set("subtitles", _subCheckbox->getState(), _domain); const MidiDriverDescription *md = getAvailableMidiDrivers(); while (md->name && md->id != (int)_midiPopUp->getSelectedTag()) md++; @@ -183,6 +186,7 @@ void OptionsDialog::close() { ConfMan.removeKey("multi_midi", _domain); ConfMan.removeKey("native_mt32", _domain); ConfMan.removeKey("music_driver", _domain); + ConfMan.removeKey("subtitles", _domain); } } @@ -230,6 +234,7 @@ void OptionsDialog::setAudioSettingsState(bool enabled) { _midiPopUp->setEnabled(enabled); _multiMidiCheckbox->setEnabled(enabled); _mt32Checkbox->setEnabled(enabled); + _subCheckbox->setEnabled(enabled); } void OptionsDialog::setVolumeSettingsState(bool enabled) { @@ -301,6 +306,10 @@ int OptionsDialog::addMIDIControls(GuiObject *boss, int yoffset) { // Native mt32 setting _mt32Checkbox = new CheckboxWidget(boss, x, yoffset, w, 16, "True Roland MT-32 (disable GM emulation)"); yoffset += 16; + + // Subtitles on/off + _subCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Display subtitles"); + yoffset += 16; _enableAudioSettings = true; diff --git a/gui/options.h b/gui/options.h index 622e63dc00a..cda1e82641b 100644 --- a/gui/options.h +++ b/gui/options.h @@ -70,12 +70,13 @@ private: CheckboxWidget *_aspectCheckbox; // - // MIDI controls + // Audio controls // bool _enableAudioSettings; PopUpWidget *_midiPopUp; CheckboxWidget *_multiMidiCheckbox; CheckboxWidget *_mt32Checkbox; + CheckboxWidget *_subCheckbox; // // Volume controls