aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2004-12-25 23:43:05 +0000
committerMax Horn2004-12-25 23:43:05 +0000
commit81b6e9e1e6119c85e8b21739fea3580183154e5d (patch)
tree90ff4fbc56afcee2ed328c3371511083f2710107 /gui
parent65ca0a07289216d7183f86b8d3b76f0033c8d34e (diff)
downloadscummvm-rg350-81b6e9e1e6119c85e8b21739fea3580183154e5d.tar.gz
scummvm-rg350-81b6e9e1e6119c85e8b21739fea3580183154e5d.tar.bz2
scummvm-rg350-81b6e9e1e6119c85e8b21739fea3580183154e5d.zip
Get rid of the useless & troublesome master_volume
svn-id: r16328
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp3
-rw-r--r--gui/options.cpp28
-rw-r--r--gui/options.h3
3 files changed, 5 insertions, 29 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index d3d8757424..5e9f9b3e08 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -252,8 +252,7 @@ void EditGameDialog::open() {
ConfMan.hasKey("native_mt32", _domain);
_globalAudioOverride->setState(e);
- e = ConfMan.hasKey("master_volume", _domain) ||
- ConfMan.hasKey("music_volume", _domain) ||
+ e = ConfMan.hasKey("music_volume", _domain) ||
ConfMan.hasKey("sfx_volume", _domain) ||
ConfMan.hasKey("speech_volume", _domain);
_globalVolumeOverride->setState(e);
diff --git a/gui/options.cpp b/gui/options.cpp
index 7bbbb98115..9bb21499d0 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -51,14 +51,13 @@ namespace GUI {
// - the save path (use _browser!)
// - music & graphics driver (but see also the comments on EditGameDialog
// for some techincal difficulties with this)
-// - default volumes (sfx/master/music)
+// - default volumes (sfx/speech/music)
// - aspect ratio, language, platform, subtitles, debug mode/level, cd drive, joystick, multi midi, native mt32
enum {
- kMasterVolumeChanged = 'mavc',
kMusicVolumeChanged = 'muvc',
kSfxVolumeChanged = 'sfvc',
- kSpeechVolumeChanged = 'vcvc',
+ kSpeechVolumeChanged = 'vcvc',
kChooseSaveDirCmd = 'chos',
kChooseExtraDirCmd = 'chex'
};
@@ -71,7 +70,6 @@ OptionsDialog::OptionsDialog(const String &domain, int x, int y, int w, int h)
_enableAudioSettings(false),
_multiMidiCheckbox(0), _mt32Checkbox(0), _subCheckbox(0),
_enableVolumeSettings(false),
- _masterVolumeSlider(0), _masterVolumeLabel(0),
_musicVolumeSlider(0), _musicVolumeLabel(0),
_sfxVolumeSlider(0), _sfxVolumeLabel(0),
_speechVolumeSlider(0), _speechVolumeLabel(0) {
@@ -134,13 +132,9 @@ void OptionsDialog::open() {
_subCheckbox->setState(ConfMan.getBool("subtitles", _domain));
}
- if (_masterVolumeSlider) {
+ if (_musicVolumeSlider) {
int vol;
- vol = ConfMan.getInt("master_volume", _domain);
- _masterVolumeSlider->setValue(vol);
- _masterVolumeLabel->setValue(vol);
-
vol = ConfMan.getInt("music_volume", _domain);
_musicVolumeSlider->setValue(vol);
_musicVolumeLabel->setValue(vol);
@@ -171,14 +165,12 @@ void OptionsDialog::close() {
}
}
- if (_masterVolumeSlider) {
+ if (_musicVolumeSlider) {
if (_enableVolumeSettings) {
- ConfMan.set("master_volume", _masterVolumeSlider->getValue(), _domain);
ConfMan.set("music_volume", _musicVolumeSlider->getValue(), _domain);
ConfMan.set("sfx_volume", _sfxVolumeSlider->getValue(), _domain);
ConfMan.set("speech_volume", _speechVolumeSlider->getValue(), _domain);
} else {
- ConfMan.removeKey("master_volume", _domain);
ConfMan.removeKey("music_volume", _domain);
ConfMan.removeKey("sfx_volume", _domain);
ConfMan.removeKey("speech_volume", _domain);
@@ -214,10 +206,6 @@ void OptionsDialog::close() {
void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
- case kMasterVolumeChanged:
- _masterVolumeLabel->setValue(_masterVolumeSlider->getValue());
- _masterVolumeLabel->draw();
- break;
case kMusicVolumeChanged:
_musicVolumeLabel->setValue(_musicVolumeSlider->getValue());
_musicVolumeLabel->draw();
@@ -261,8 +249,6 @@ void OptionsDialog::setAudioSettingsState(bool enabled) {
void OptionsDialog::setVolumeSettingsState(bool enabled) {
_enableVolumeSettings = enabled;
- _masterVolumeSlider->setEnabled(enabled);
- _masterVolumeLabel->setEnabled(enabled);
_musicVolumeSlider->setEnabled(enabled);
_musicVolumeLabel->setEnabled(enabled);
_sfxVolumeSlider->setEnabled(enabled);
@@ -340,12 +326,6 @@ int OptionsDialog::addMIDIControls(GuiObject *boss, int yoffset) {
int OptionsDialog::addVolumeControls(GuiObject *boss, int yoffset) {
// Volume controllers
- _masterVolumeSlider = new SliderWidget(boss, 5, yoffset, 185, 12, "Master volume: ", 100, kMasterVolumeChanged);
- _masterVolumeLabel = new StaticTextWidget(boss, 200, yoffset + 2, 24, kLineHeight, "100%", kTextAlignLeft);
- _masterVolumeSlider->setMinValue(0); _masterVolumeSlider->setMaxValue(255);
- _masterVolumeLabel->setFlags(WIDGET_CLEARBG);
- yoffset += 16;
-
_musicVolumeSlider = new SliderWidget(boss, 5, yoffset, 185, 12, "Music volume: ", 100, kMusicVolumeChanged);
_musicVolumeLabel = new StaticTextWidget(boss, 200, yoffset + 2, 24, kLineHeight, "100%", kTextAlignLeft);
_musicVolumeSlider->setMinValue(0); _musicVolumeSlider->setMaxValue(255);
diff --git a/gui/options.h b/gui/options.h
index 08965e7fe5..a1cd44a47c 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -82,9 +82,6 @@ private:
//
bool _enableVolumeSettings;
- SliderWidget *_masterVolumeSlider;
- StaticTextWidget *_masterVolumeLabel;
-
SliderWidget *_musicVolumeSlider;
StaticTextWidget *_musicVolumeLabel;