[Scummvm-cvs-logs] SF.net SVN: scummvm: [23130] scummvm/trunk/gui

sev at users.sourceforge.net sev at users.sourceforge.net
Thu Jun 15 15:18:48 CEST 2006


Revision: 23130
Author:   sev
Date:     2006-06-15 06:18:28 -0700 (Thu, 15 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23130&view=rev

Log Message:
-----------
- 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.

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/theme-config.cpp
    scummvm/trunk/gui/themes/modern.ini
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2006-06-15 12:12:31 UTC (rev 23129)
+++ scummvm/trunk/base/main.cpp	2006-06-15 13:18:28 UTC (rev 23130)
@@ -118,7 +118,6 @@
 		// 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();
 

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2006-06-15 12:12:31 UTC (rev 23129)
+++ scummvm/trunk/gui/launcher.cpp	2006-06-15 13:18:28 UTC (rev 23130)
@@ -213,10 +213,16 @@
 	//
 	// 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,8 +304,10 @@
 	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
 
 	const Common::LanguageDescription *l = Common::g_languages;
@@ -366,6 +374,8 @@
 	case kCmdGlobalAudioOverride:
 		setAudioSettingsState(data != 0);
 		setSubtitleSettingsState(data != 0);
+		if(_globalVolumeOverride == NULL)
+			setVolumeSettingsState(data != 0);
 		draw();
 		break;
 	case kCmdGlobalMIDIOverride:

Modified: scummvm/trunk/gui/theme-config.cpp
===================================================================
--- scummvm/trunk/gui/theme-config.cpp	2006-06-15 12:12:31 UTC (rev 23129)
+++ scummvm/trunk/gui/theme-config.cpp	2006-06-15 13:18:28 UTC (rev 23130)
@@ -51,6 +51,7 @@
 "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 @@
 "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 @@
 "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 @@
 "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 @@
 "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"

Modified: scummvm/trunk/gui/themes/modern.ini
===================================================================
--- scummvm/trunk/gui/themes/modern.ini	2006-06-15 12:12:31 UTC (rev 23129)
+++ scummvm/trunk/gui/themes/modern.ini	2006-06-15 13:18:28 UTC (rev 23130)
@@ -221,7 +221,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 @@
 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 @@
 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 @@
 
 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 @@
 # 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_


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list