aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2006-06-15 13:18:28 +0000
committerEugene Sandulenko2006-06-15 13:18:28 +0000
commit6f844ae420e3a5722a1b580b1de95713a2b832a6 (patch)
tree5380443b1f027727b0083eb7efa4f4ea87c8f091
parent65041ae239055e07b7f592f1cfcca01e1c89e159 (diff)
downloadscummvm-rg350-6f844ae420e3a5722a1b580b1de95713a2b832a6.tar.gz
scummvm-rg350-6f844ae420e3a5722a1b580b1de95713a2b832a6.tar.bz2
scummvm-rg350-6f844ae420e3a5722a1b580b1de95713a2b832a6.zip
- Make tabs narrower so they all fit on screen. Now navigation buttons
appear only on PSP resolution - Combined Audio/Volume tab in game options for consistency. svn-id: r23130
-rw-r--r--base/main.cpp1
-rw-r--r--gui/launcher.cpp16
-rw-r--r--gui/theme-config.cpp15
-rw-r--r--gui/themes/modern.ini24
4 files changed, 36 insertions, 20 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 49b36c312a..94f5617f16 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -118,7 +118,6 @@ static bool launcherDialog(OSystem &system) {
// Set the user specified graphics mode (if any).
system.setGraphicsMode(ConfMan.get("gfx_mode").c_str());
- // Make GUI 640 x 400
system.initSize(320, 200);
system.endGFXTransaction();
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index a52d61bf3b..15fe879bca 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -213,9 +213,15 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
//
// 5) The volume tab
//
- tab->addTab("Volume");
+ int volControlPos = g_gui.evaluator()->getVar("volumeControlsInAudio", true);
- _globalVolumeOverride = new CheckboxWidget(tab, "gameoptions_volumeCheckbox", "Override global volume settings", kCmdGlobalVolumeOverride, 0);
+ if (!volControlPos) {
+ tab->addTab("Volume");
+
+ _globalVolumeOverride = new CheckboxWidget(tab, "gameoptions_volumeCheckbox", "Override global volume settings", kCmdGlobalVolumeOverride, 0);
+ } else {
+ _globalVolumeOverride = NULL;
+ }
addVolumeControls(tab, "gameoptions_");
@@ -298,7 +304,9 @@ void EditGameDialog::open() {
e = ConfMan.hasKey("music_volume", _domain) ||
ConfMan.hasKey("sfx_volume", _domain) ||
ConfMan.hasKey("speech_volume", _domain);
- _globalVolumeOverride->setState(e);
+
+ if (_globalVolumeOverride)
+ _globalVolumeOverride->setState(e);
// TODO: game path
@@ -366,6 +374,8 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
case kCmdGlobalAudioOverride:
setAudioSettingsState(data != 0);
setSubtitleSettingsState(data != 0);
+ if(_globalVolumeOverride == NULL)
+ setVolumeSettingsState(data != 0);
draw();
break;
case kCmdGlobalMIDIOverride:
diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp
index 494ffc0a39..f0f7944093 100644
--- a/gui/theme-config.cpp
+++ b/gui/theme-config.cpp
@@ -51,6 +51,7 @@ const char *Theme::_defaultConfigINI =
"def_scummhelpW=(w - 2 * 5)\n"
"def_midiControlsSpacing=1\n"
"def_vcAudioTabIndent=0\n"
+"def_vcAudioTabSpacing=2\n"
"use=XxY\n"
"\n"
"TabWidget.tabWidth=0\n"
@@ -95,6 +96,7 @@ const char *Theme::_defaultConfigINI =
"def_scummhelpX=((w - scummhelpW) / 2)\n"
"def_midiControlsSpacing=2\n"
"def_vcAudioTabIndent=10\n"
+"def_vcAudioTabSpacing=4\n"
"##### Widgets config\n"
"ListWidget.leftPadding=4\n"
"ListWidget.rightPadding=0\n"
@@ -233,6 +235,7 @@ const char *Theme::_defaultConfigINI =
"gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight\n"
"opYoffset=(opYoffset + buttonHeight)\n"
"useWithPrefix=audioControls gameoptions_\n"
+"useWithPrefix=volumeControls gameoptions_\n"
"useWithPrefix=subtitleControls gameoptions_\n"
"\n"
"# midi tab\n"
@@ -241,12 +244,6 @@ const char *Theme::_defaultConfigINI =
"opYoffset=(opYoffset + buttonHeight)\n"
"useWithPrefix=midiControls gameoptions_\n"
"\n"
-"# volume tab\n"
-"opYoffset=vBorder\n"
-"gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 189) buttonHeight\n"
-"opYoffset=(opYoffset + buttonHeight)\n"
-"useWithPrefix=volumeControls gameoptions_\n"
-"\n"
"gameoptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n"
"gameoptions_ok=(prev.x2 + 10) prev.y prev.w prev.h\n"
"\n"
@@ -350,17 +347,17 @@ const char *Theme::_defaultConfigINI =
"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"
+"opYoffset=(opYoffset + sliderHeight + vcAudioTabSpacing)\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"
+"opYoffset=(opYoffset + sliderHeight + vcAudioTabSpacing)\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"
-"opYoffset=(opYoffset + sliderHeight + 4)\n"
+"opYoffset=(opYoffset + sliderHeight + vcAudioTabSpacing)\n"
"\n"
"[midiControls]\n"
"mcx=10\n"
diff --git a/gui/themes/modern.ini b/gui/themes/modern.ini
index bbd3673400..c55cb4609c 100644
--- a/gui/themes/modern.ini
+++ b/gui/themes/modern.ini
@@ -221,7 +221,7 @@ Console.leftPadding=7
Console.rightPadding=5
Console.topPadding=5
Console.bottomPadding=5
-TabWidget.tabWidth=100
+TabWidget.tabWidth=85
TabWidget.tabHeight=27
TabWidget.titleVPad=8
TabWidget.navButtonRightPad=3
@@ -349,6 +349,7 @@ opYoffset=vBorder
gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
opYoffset=(opYoffset + buttonHeight + 6)
useWithPrefix=audioControls gameoptions_
+useWithPrefix=volumeControls gameoptions_
useWithPrefix=subtitleControls gameoptions_
# midi tab
@@ -357,12 +358,6 @@ gameoptions_midiCheckbox=gox opYoffset (kFontHeight + 10 + 174) buttonHeight
opYoffset=(opYoffset + buttonHeight + 6)
useWithPrefix=midiControls gameoptions_
-# volume tab
-opYoffset=vBorder
-gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 189) buttonHeight
-opYoffset=(opYoffset + buttonHeight + 6)
-useWithPrefix=volumeControls gameoptions_
-
gameoptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
gameoptions_ok=(prev.x2 + 10) prev.y prev.w prev.h
@@ -571,6 +566,8 @@ def_aboutOuterBorder=10
use=XxY
+TabWidget.tabWidth=75
+
# Override launcher
launcher_list=insetX 103 (w - buttonWidth - 17 * 2 - self.x) (h - 15 - self.y)
launcher_version=50 80 247 kLineHeight
@@ -590,3 +587,16 @@ useWithPrefix=subtitleControls globaloptions_
# volume tab
opYoffset=vBorder
useWithPrefix=volumeControls globaloptions_
+
+# audio tab
+opYoffset=vBorder
+gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
+opYoffset=(opYoffset + buttonHeight + 6)
+useWithPrefix=audioControls gameoptions_
+useWithPrefix=subtitleControls gameoptions_
+
+# volume tab
+opYoffset=vBorder
+gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
+opYoffset=(opYoffset + buttonHeight + 6)
+useWithPrefix=volumeControls gameoptions_