[Scummvm-cvs-logs] SF.net SVN: scummvm:[33883] scummvm/branches/gsoc2008-gui/gui

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Fri Aug 15 01:17:42 CEST 2008


Revision: 33883
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33883&view=rev
Author:   Tanoku
Date:     2008-08-14 23:17:41 +0000 (Thu, 14 Aug 2008)

Log Message:
-----------
Misc GFX tweaks.

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/gui/TabWidget.h
    scummvm/branches/gsoc2008-gui/gui/launcher.cpp
    scummvm/branches/gsoc2008-gui/gui/newgui.cpp
    scummvm/branches/gsoc2008-gui/gui/options.cpp
    scummvm/branches/gsoc2008-gui/gui/options.h

Modified: scummvm/branches/gsoc2008-gui/gui/TabWidget.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/TabWidget.h	2008-08-14 23:07:09 UTC (rev 33882)
+++ scummvm/branches/gsoc2008-gui/gui/TabWidget.h	2008-08-14 23:17:41 UTC (rev 33883)
@@ -85,6 +85,11 @@
 	 * Widgets are always added to the active tab.
 	 */
 	void setActiveTab(int tabID);
+	
+	void setTabTitle(int tabID, const String &title) {
+		assert(0 <= tabID && tabID < (int)_tabs.size());
+		_tabs[tabID].title = title;
+	}
 
 	virtual void handleMouseDown(int x, int y, int button, int clickCount);
 	virtual bool handleKeyDown(Common::KeyState state);

Modified: scummvm/branches/gsoc2008-gui/gui/launcher.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/launcher.cpp	2008-08-14 23:07:09 UTC (rev 33882)
+++ scummvm/branches/gsoc2008-gui/gui/launcher.cpp	2008-08-14 23:17:41 UTC (rev 33883)
@@ -195,7 +195,7 @@
 	//
 	// 3) The graphics tab
 	//
-	tab->addTab("Graphics");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX");
 
 	_globalGraphicsOverride = new CheckboxWidget(tab, "GameOptions_Graphics.EnableTabCheckbox", "Override global graphic settings", kCmdGlobalGraphicsOverride, 0);
 
@@ -257,6 +257,7 @@
 	
 	// Activate the first tab
 	tab->setActiveTab(0);
+	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
 	new ButtonWidget(this, "GameOptions.Cancel", "Cancel", kCloseCmd, 0);

Modified: scummvm/branches/gsoc2008-gui/gui/newgui.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/newgui.cpp	2008-08-14 23:07:09 UTC (rev 33882)
+++ scummvm/branches/gsoc2008-gui/gui/newgui.cpp	2008-08-14 23:17:41 UTC (rev 33883)
@@ -94,7 +94,7 @@
 	if (themefile.compareToIgnoreCase("default") == 0)
 		themefile = "builtin";
 		
-	if (!themefile.hasSuffix(".zip"))
+	if (themefile != "builtin" && !themefile.hasSuffix(".zip"))
 		themefile += ".zip";
 
 	loadNewTheme(themefile);

Modified: scummvm/branches/gsoc2008-gui/gui/options.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/options.cpp	2008-08-14 23:07:09 UTC (rev 33882)
+++ scummvm/branches/gsoc2008-gui/gui/options.cpp	2008-08-14 23:17:41 UTC (rev 33883)
@@ -73,12 +73,12 @@
 
 
 OptionsDialog::OptionsDialog(const String &domain, int x, int y, int w, int h)
-	: Dialog(x, y, w, h), _domain(domain) {
+	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _tabWidget(0) {
 	init();
 }
 
 OptionsDialog::OptionsDialog(const String &domain, const String &name)
-	: Dialog(name), _domain(domain) {
+	: Dialog(name), _domain(domain), _graphicsTabId(-1), _tabWidget(0) {
 	init();
 }
 
@@ -644,6 +644,9 @@
 	Dialog::reflowLayout();
 
 	int labelWidth = g_gui.xmlEval()->getVar("Globals.TabLabelWidth");
+	
+	if (_graphicsTabId != -1 && _tabWidget)
+		_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX");
 
 	if (_midiPopUp)
 		_midiPopUp->changeLabelWidth(labelWidth);
@@ -667,7 +670,7 @@
 	//
 	// 1) The graphics tab
 	//
-	tab->addTab(g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? "Graphics" : "GFX");
 	addGraphicControls(tab, "GlobalOptions_Graphics.");
 
 	//
@@ -735,6 +738,7 @@
 
 	// Activate the first tab
 	tab->setActiveTab(0);
+	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
 	new ButtonWidget(this, "GlobalOptions.Cancel", "Cancel", kCloseCmd, 0);

Modified: scummvm/branches/gsoc2008-gui/gui/options.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/options.h	2008-08-14 23:07:09 UTC (rev 33882)
+++ scummvm/branches/gsoc2008-gui/gui/options.h	2008-08-14 23:17:41 UTC (rev 33883)
@@ -26,6 +26,7 @@
 #define OPTIONS_DIALOG_H
 
 #include "gui/dialog.h"
+#include "gui/TabWidget.h"
 #include "common/str.h"
 
 #ifdef SMALL_SCREEN_DEVICE
@@ -80,6 +81,9 @@
 	void setMIDISettingsState(bool enabled);
 	void setVolumeSettingsState(bool enabled);
 	void setSubtitleSettingsState(bool enabled);
+	
+	TabWidget *_tabWidget;
+	int _graphicsTabId;
 
 private:
 	//


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