aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp18
-rw-r--r--gui/options.h2
-rw-r--r--gui/themes/scummclassic.zipbin45730 -> 45221 bytes
-rw-r--r--gui/themes/scummmodern.zipbin148944 -> 148602 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx9
5 files changed, 27 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 415d7ca357..2e23a4dc61 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -119,6 +119,7 @@ void OptionsDialog::init() {
_speechVolumeDesc = 0;
_speechVolumeSlider = 0;
_speechVolumeLabel = 0;
+ _muteCheckbox = 0;
_subToggleDesc = 0;
_subToggleButton = 0;
_subSpeedDesc = 0;
@@ -240,12 +241,19 @@ void OptionsDialog::open() {
vol = ConfMan.getInt("speech_volume", _domain);
_speechVolumeSlider->setValue(vol);
_speechVolumeLabel->setValue(vol);
+
+ bool val = false;
+ if (ConfMan.hasKey("mute", _domain)) {
+ val = ConfMan.getBool("mute", _domain);
+ } else {
+ ConfMan.setBool("mute", false);
+ }
+ _muteCheckbox->setState(val);
}
// Subtitle options
if (_subToggleButton) {
- int speed;
- int sliderMaxValue = _subSpeedSlider->getMaxValue();
+ int speed; int sliderMaxValue = _subSpeedSlider->getMaxValue();
_subMode = getSubtitleMode(ConfMan.getBool("subtitles", _domain), ConfMan.getBool("speech_mute", _domain));
_subToggleButton->setLabel(_subModeDesc[_subMode]);
@@ -300,10 +308,12 @@ void OptionsDialog::close() {
ConfMan.setInt("music_volume", _musicVolumeSlider->getValue(), _domain);
ConfMan.setInt("sfx_volume", _sfxVolumeSlider->getValue(), _domain);
ConfMan.setInt("speech_volume", _speechVolumeSlider->getValue(), _domain);
+ ConfMan.setBool("mute", _muteCheckbox->getState(), _domain);
} else {
ConfMan.removeKey("music_volume", _domain);
ConfMan.removeKey("sfx_volume", _domain);
ConfMan.removeKey("speech_volume", _domain);
+ ConfMan.removeKey("mute", _domain);
}
}
@@ -514,6 +524,7 @@ void OptionsDialog::setVolumeSettingsState(bool enabled) {
_speechVolumeDesc->setEnabled(enabled);
_speechVolumeSlider->setEnabled(enabled);
_speechVolumeLabel->setEnabled(enabled);
+ _muteCheckbox->setEnabled(enabled);
}
void OptionsDialog::setSubtitleSettingsState(bool enabled) {
@@ -640,6 +651,9 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const String &prefix) {
_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
+ _muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", "Mute All", 0, 0);
+
+
_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", "SFX volume:");
_sfxVolumeSlider = new SliderWidget(boss, prefix + "vcSfxSlider", kSfxVolumeChanged);
_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", "100%");
diff --git a/gui/options.h b/gui/options.h
index 53fc5e2d01..4edf12a0df 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -145,6 +145,8 @@ private:
StaticTextWidget *_speechVolumeDesc;
SliderWidget *_speechVolumeSlider;
StaticTextWidget *_speechVolumeLabel;
+
+ CheckboxWidget *_muteCheckbox;
};
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 798f4d292f..7dcf3402ed 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index a67b11f244..9838b8b2f4 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 736fce87f2..6246b6c965 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -252,6 +252,11 @@
/>
<widget name = 'vcSfxLabel'
type = 'SmallLabel'
+ width = "40"
+ />
+ <space/>
+ <widget name = 'vcMuteCheckbox'
+ type = 'Checkbox'
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
@@ -592,8 +597,12 @@
/>
<widget name = 'vcSfxLabel'
type = 'SmallLabel'
+ width = "40"
/>
</layout>
+ <widget name = 'vcMuteCheckbox'
+ type = 'Checkbox'
+ />
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '8'>
<widget name = 'vcSpeechText'
type = 'OptionsLabel'