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

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Mar 10 15:15:48 CET 2007


Revision: 26058
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26058&view=rev
Author:   sev
Date:     2007-03-10 06:15:47 -0800 (Sat, 10 Mar 2007)

Log Message:
-----------
Move mass add dialog settings to theme config. Bump theme ini version.

Modified Paths:
--------------
    scummvm/trunk/gui/massadd.cpp
    scummvm/trunk/gui/theme-config.cpp
    scummvm/trunk/gui/theme.h
    scummvm/trunk/gui/themes/modern.ini

Modified: scummvm/trunk/gui/massadd.cpp
===================================================================
--- scummvm/trunk/gui/massadd.cpp	2007-03-10 13:53:11 UTC (rev 26057)
+++ scummvm/trunk/gui/massadd.cpp	2007-03-10 14:15:47 UTC (rev 26058)
@@ -56,7 +56,7 @@
 
 
 MassAddDialog::MassAddDialog(const FilesystemNode &startDir)
-	: Dialog(10, 20, 300, 174),
+	: Dialog("massadddialog"),
 	_dirsScanned(0),
 	_okButton(0),
 	_dirProgressText(0),
@@ -66,16 +66,6 @@
 	_scanStack.push(startDir);
 
 
-	int buttonWidth, buttonHeight;
-
-	if (g_gui.getWidgetSize() == kBigWidgetSize) {
-		buttonWidth = kBigButtonWidth;
-		buttonHeight = kBigButtonHeight;
-	} else {
-		buttonWidth = kButtonWidth;
-		buttonHeight = kButtonHeight;
-	}
-
 	// Create dialog items
 	// We need:
 	// - "OK" button, only enabled after the scan has finished
@@ -84,22 +74,18 @@
 	// - static text displaying the progress text
 	// - (future) a listbox showing all the games we added/are going to add
 
-	new StaticTextWidget(this, 10, 10 + 1 * kLineHeight, _w - 2*10, kLineHeight,
-								"Mass Add Dialog", kTextAlignCenter);
+	new StaticTextWidget(this, "massadddialog_caption",	"Mass Add Dialog");
 
-	_dirProgressText = new StaticTextWidget(this, 10, 10 + 3 * kLineHeight, _w - 2*10, kLineHeight,
-								"... progress ...", kTextAlignCenter);
+	_dirProgressText = new StaticTextWidget(this, "massadddialog_dirprogress",
+											"... progress ...");
 
-	_gameProgressText = new StaticTextWidget(this, 10, 10 + 4 * kLineHeight, _w - 2*10, kLineHeight,
-								"... progress ...", kTextAlignCenter);
+	_gameProgressText = new StaticTextWidget(this, "massadddialog_gameprogress",
+											 "... progress ...");
 
-	int okButtonPos = (_w - (buttonWidth * 2)) / 2;
-	int cancelButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
-
-	_okButton = addButton(this, okButtonPos, _h - buttonHeight - 8, "OK", kOkCmd, '\n');
+	_okButton = new ButtonWidget(this, "massadddialog_ok", "OK", kOkCmd, '\n');
 	_okButton->setEnabled(false);
 
-	addButton(this, cancelButtonPos, _h - buttonHeight - 8, "Cancel", kCancelCmd, '\27');
+	new ButtonWidget(this, "massadddialog_cancel", "Cancel", kCancelCmd, '\27');
 
 }
 

Modified: scummvm/trunk/gui/theme-config.cpp
===================================================================
--- scummvm/trunk/gui/theme-config.cpp	2007-03-10 13:53:11 UTC (rev 26057)
+++ scummvm/trunk/gui/theme-config.cpp	2007-03-10 14:15:47 UTC (rev 26058)
@@ -293,6 +293,17 @@
 "keysdialog_action=prev.x (parent.h - kLineHeight * 3) (parent.w - self.x * 2) kLineHeight\n"
 "keysdialog_mapping=prev.x (prev.y + kLineHeight) prev.w prev.h\n"
 "\n"
+"### mass add dialog\n"
+"massadddialog=10 20 300 174\n"
+"set_parent=massadddialog\n"
+"massadddialog_caption=10 (10 + 1 * kLineHeight) (parent.w - 2*10) kLineHeight\n"
+"massadddialog_caption.align=kTextAlignCenter\n"
+"massadddialog_dirprogress=10 (10 + 3 * kLineHeight) (parent.w - 2*10) kLineHeight\n"
+"massadddialog_dirprogress.align=kTextAlignCenter\n"
+"massadddialog_gameprogress=10 (10 + 4 * kLineHeight) (parent.w - 2*10) kLineHeight\n"
+"massadddialog_gameprogress.align=kTextAlignCenter\n"
+"massadddialog_ok=((parent.w - (buttonWidth * 2)) / 2) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n"
+"massadddialog_cancel=(prev.x2 + 10) prev.y prev.w prev.h\n"
 "\n"
 "\n"
 "##### SCUMM dialogs\n"

Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h	2007-03-10 13:53:11 UTC (rev 26057)
+++ scummvm/trunk/gui/theme.h	2007-03-10 14:15:47 UTC (rev 26058)
@@ -32,7 +32,7 @@
 #include "graphics/surface.h"
 #include "graphics/fontman.h"
 
-#define THEME_VERSION 20
+#define THEME_VERSION 21
 
 namespace GUI {
 

Modified: scummvm/trunk/gui/themes/modern.ini
===================================================================
--- scummvm/trunk/gui/themes/modern.ini	2007-03-10 13:53:11 UTC (rev 26057)
+++ scummvm/trunk/gui/themes/modern.ini	2007-03-10 14:15:47 UTC (rev 26058)
@@ -1,7 +1,7 @@
 # $URL$
 # $Id$
 [theme]
-version=20
+version=21
 type=modern
 name=Modern Style
 
@@ -383,6 +383,17 @@
 keysdialog_mapping=prev.x (prev.y + kLineHeight) prev.w prev.h
 keysdialog_mapping.align=kTextAlignCenter
 
+### mass add dialog
+massadddialog=10 20 300 174
+set_parent=massadddialog
+massadddialog_caption=10 (10 + 1 * kLineHeight) (parent.w - 2*10) kLineHeight
+massadddialog_caption.align=kTextAlignCenter
+massadddialog_dirprogress=10 (10 + 3 * kLineHeight) prev.w prev.h
+massadddialog_dirprogress.align=kTextAlignCenter
+massadddialog_gameprogress=10 (10 + 4 * kLineHeight) prev.w prev.h
+massadddialog_gameprogress.align=kTextAlignCenter
+massadddialog_ok=((parent.w - (buttonWidth * 2)) / 2) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
+massadddialog_cancel=(prev.x2 + 10) prev.y prev.w prev.h
 
 
 ##### SCUMM dialogs


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