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

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Sat Sep 20 14:36:59 CEST 2008


Revision: 34608
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34608&view=rev
Author:   Tanoku
Date:     2008-09-20 12:36:58 +0000 (Sat, 20 Sep 2008)

Log Message:
-----------
Added global ingame menu definitions to theme files.

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/engines/dialogs.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeEngine.h
    scummvm/branches/gsoc2008-gui/gui/themes/default.inc
    scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx
    scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx
    scummvm/branches/gsoc2008-gui/gui/themes/scummclassic.zip
    scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx
    scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout.stx
    scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx
    scummvm/branches/gsoc2008-gui/gui/themes/scummodern.zip

Modified: scummvm/branches/gsoc2008-gui/engines/dialogs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/engines/dialogs.cpp	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/engines/dialogs.cpp	2008-09-20 12:36:58 UTC (rev 34608)
@@ -73,38 +73,39 @@
 };
 
 MainMenuDialog::MainMenuDialog(Engine *engine)
-	: GlobalDialog("globalmain"), _engine(engine) {
+	: GlobalDialog("GlobalMenu"), _engine(engine) {
+	_backgroundType = GUI::Theme::kDialogBackgroundSpecial;
 
 #ifndef DISABLE_FANCY_THEMES
 	_logo = 0;
-	if (g_gui.xmlEval()->getVar("global_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
-		_logo = new GUI::GraphicsWidget(this, "global_logo");
+	if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {
+		_logo = new GUI::GraphicsWidget(this, "GlobalMenu.Logo");
 		_logo->useThemeTransparency(true);
 		_logo->setGfx(g_gui.theme()->getImageSurface(GUI::Theme::kImageLogoSmall));
 	} else {
-		new StaticTextWidget(this, "global_title", "ScummVM");
+		new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
 	}
 #else
-	new StaticTextWidget(this, "global_title", "ScummVM");
+	new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
 #endif
 
-	new StaticTextWidget(this, "global_version", gScummVMVersionDate);
+	new StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate);
 		
-	new GUI::ButtonWidget(this, "globalmain_resume", "Resume", kPlayCmd, 'P');
+	new GUI::ButtonWidget(this, "GlobalMenu.Resume", "Resume", kPlayCmd, 'P');
 
 //	new GUI::ButtonWidget(this, "globalmain_load", "Load", kLoadCmd, 'L');
 //	new GUI::ButtonWidget(this, "globalmain_save", "Save", kSaveCmd, 'S');
 
-	new GUI::ButtonWidget(this, "globalmain_options", "Options", kOptionsCmd, 'O');
+	new GUI::ButtonWidget(this, "GlobalMenu.Options", "Options", kOptionsCmd, 'O');
 
-	new GUI::ButtonWidget(this, "globalmain_about", "About", kAboutCmd, 'A');
+	new GUI::ButtonWidget(this, "GlobalMenu.About", "About", kAboutCmd, 'A');
 
-	_rtlButton = new GUI::ButtonWidget(this, "globalmain_rtl", "Return to Launcher", kRTLCmd, 'R');	
+	_rtlButton = new GUI::ButtonWidget(this, "GlobalMenu.RTL", "Return to Launcher", kRTLCmd, 'R');	
 	// '0' corresponds to the kSupportsRTL MetaEngineFeature
 	_rtlButton->setEnabled(_engine->hasFeature(0));
 
 
-	new GUI::ButtonWidget(this, "globalmain_quit", "Quit", kQuitCmd, 'Q');
+	new GUI::ButtonWidget(this, "GlobalMenu.Quit", "Quit", kQuitCmd, 'Q');
 
 	_aboutDialog = new GUI::AboutDialog();
 	_optionsDialog = new ConfigDialog();
@@ -147,22 +148,22 @@
 
 void MainMenuDialog::reflowLayout() {
 #ifndef DISABLE_FANCY_THEMES
-	if (g_gui.xmlEval()->getVar("global_logo.visible") == 1 && g_gui.theme()->supportsImages()) {
+	if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {
 		if (!_logo)
-			_logo = new GUI::GraphicsWidget(this, "global_logo");
+			_logo = new GUI::GraphicsWidget(this, "GlobalMenu.Logo");
 		_logo->useThemeTransparency(true);
 		_logo->setGfx(g_gui.theme()->getImageSurface(GUI::Theme::kImageLogoSmall));
 
-		GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("global_title");
+		GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title");
 		if (title) {
 			removeWidget(title);
 			title->setNext(0);
 			delete title;
 		}
 	} else {
-		GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("global_title");
+		GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title");
 		if (!title)
-			new StaticTextWidget(this, "global_title", "ScummVM");
+			new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
 
 		if (_logo) {
 			removeWidget(_logo);
@@ -210,30 +211,30 @@
 //  "" as value for the domain, and in fact provide a somewhat better user
 // experience at the same time.
 ConfigDialog::ConfigDialog()
-	: GUI::OptionsDialog("", "scummconfig") {
+	: GUI::OptionsDialog("", "ScummConfig") {
 
 	//
 	// Sound controllers
 	//
 
-	addVolumeControls(this, "scummconfig_");
+	addVolumeControls(this, "ScummConfig.");
 
 	//
 	// Some misc options
 	//
 
 	// SCUMM has a talkspeed range of 0-9
-	addSubtitleControls(this, "scummconfig_", 9);
+	addSubtitleControls(this, "ScummConfig.", 9);
 
 	//
 	// Add the buttons
 	//
 
-	new GUI::ButtonWidget(this, "scummconfig_ok", "OK", GUI::OptionsDialog::kOKCmd, 'O');
-	new GUI::ButtonWidget(this, "scummconfig_cancel", "Cancel", kCloseCmd, 'C');
+	new GUI::ButtonWidget(this, "ScummConfig.Ok", "OK", GUI::OptionsDialog::kOKCmd, 'O');
+	new GUI::ButtonWidget(this, "ScummConfig.Cancel", "Cancel", kCloseCmd, 'C');
 
 #ifdef SMALL_SCREEN_DEVICE
-	new GUI::ButtonWidget(this, "scummconfig_keys", "Keys", kKeysCmd, 'K');
+	new GUI::ButtonWidget(this, "ScummConfig.Keys", "Keys", kKeysCmd, 'K');
 
 	//
 	// Create the sub dialog(s)

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeEngine.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeEngine.h	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeEngine.h	2008-09-20 12:36:58 UTC (rev 34608)
@@ -503,6 +503,8 @@
 	const Graphics::Surface *getImageSurface(const kThemeImages n) const {
 		if (n == kImageLogo)
 			return _bitmaps.contains("logo.bmp") ? _bitmaps["logo.bmp"] : 0;
+		else if (n == kImageLogoSmall)
+			return _bitmaps.contains("logo_small.bmp") ? _bitmaps["logo_small.bmp"] : 0;
 			
 		return 0;
 	}

Modified: scummvm/branches/gsoc2008-gui/gui/themes/default.inc
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/default.inc	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/gui/themes/default.inc	2008-09-20 12:36:58 UTC (rev 34608)
@@ -314,6 +314,7 @@
 "<def var = 'PopUpWidget.labelSpacing' value = '10' /> "
 "<def var = 'Layout.Spacing' value = '8' /> "
 "<def var = 'ShowLauncherLogo' value = '0'/> "
+"<def var = 'ShowGlobalMenuLogo' value = '0'/> "
 "<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/> "
 "<widget name = 'OptionsLabel' "
 "size = '110, Globals.Line.Height' "
@@ -705,6 +706,40 @@
 "</layout> "
 "</layout> "
 "</dialog> "
+"<dialog name = 'GlobalMenu' overlays = 'screen_center'> "
+"<layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'> "
+"<widget name = 'Title' "
+"width = '210' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Version' "
+"width = '210' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Resume' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '10'/> "
+"<widget name = 'Options' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'About' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '10'/> "
+"<widget name = 'RTL' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'Quit' "
+"width = '150' "
+"height = 'Globals.Button.Height' "
+"/> "
+"</layout> "
+"</dialog> "
 "<dialog name = 'ScummMain' overlays = 'screen_center'> "
 "<layout type = 'vertical' padding = '8, 8, 8, 8'> "
 "<widget name = 'Resume' "
@@ -861,6 +896,7 @@
 "<def var = 'PopUpWidget.labelSpacing' value = '6' /> "
 "<def var = 'Layout.Spacing' value = '8'/> "
 "<def var = 'ShowLauncherLogo' value = '0'/> "
+"<def var = 'ShowGlobalMenuLogo' value = '0'/> "
 "<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '0'/> "
 "<widget name = 'Button' "
 "size = 'kButtonWidth, kButtonHeight' "
@@ -1252,6 +1288,40 @@
 "</layout> "
 "</layout> "
 "</dialog> "
+"<dialog name = 'GlobalMenu' overlays = 'screen_center'> "
+"<layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'> "
+"<widget name = 'Title' "
+"width = '120' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Version' "
+"width = '120' "
+"height = 'Globals.Line.Height' "
+"/> "
+"<widget name = 'Resume' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '4'/> "
+"<widget name = 'Options' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'About' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<space size = '4'/> "
+"<widget name = 'RTL' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"<widget name = 'Quit' "
+"width = '70' "
+"height = 'Globals.Button.Height' "
+"/> "
+"</layout> "
+"</dialog> "
 "<dialog name = 'ScummMain' overlays = 'screen_center'> "
 "<layout type = 'vertical' padding = '8, 8, 8, 8'> "
 "<widget name = 'Resume' "

Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx	2008-09-20 12:36:58 UTC (rev 34608)
@@ -35,6 +35,7 @@
 		
 		<def var = 'Layout.Spacing' value = '8' />
 		<def var = 'ShowLauncherLogo' value = '0'/>
+		<def var = 'ShowGlobalMenuLogo' value = '0'/>
 		
 		<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
 
@@ -448,6 +449,41 @@
 		</layout>
 	</dialog>
 	
+	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'>
+			<widget name = 'Title'
+					width = '210'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Version'
+					width = '210'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Resume'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '10'/>
+			<widget name = 'Options'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'About'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '10'/>
+			<widget name = 'RTL'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'Quit'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+		</layout>
+	</dialog>
+	
 	<dialog name = 'ScummMain' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Resume'

Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx	2008-09-20 12:36:58 UTC (rev 34608)
@@ -36,6 +36,7 @@
 		<def var = 'Layout.Spacing' value = '8'/>
 
 		<def var = 'ShowLauncherLogo' value = '0'/>
+		<def var = 'ShowGlobalMenuLogo' value = '0'/>
 		<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '0'/>
 
 		<widget name = 'Button'
@@ -448,6 +449,41 @@
 			</layout>
 		</layout>
 	</dialog>
+	
+	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'>
+			<widget name = 'Title'
+					width = '120'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Version'
+					width = '120'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Resume'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '4'/>
+			<widget name = 'Options'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'About'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '4'/>
+			<widget name = 'RTL'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'Quit'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+		</layout>
+	</dialog>
 
 	<dialog name = 'ScummMain' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>

Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx	2008-09-20 12:36:58 UTC (rev 34608)
@@ -56,6 +56,7 @@
 		<bitmap filename = 'cursor.bmp'/>
 		<bitmap filename = 'cursor_small.bmp'/>
 		<bitmap filename = 'checkbox.bmp'/>
+		<bitmap filename = 'logo_small.bmp'/>
 	</bitmaps>
 
 	<fonts>
@@ -117,6 +118,7 @@
 					gradient_start = '208, 112, 8'
 					gradient_end = '232, 192, 16'
 					shadow = '3'
+					gradient_factor = '3'
 		/>
 	</drawdata>
 

Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout.stx	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout.stx	2008-09-20 12:36:58 UTC (rev 34608)
@@ -43,6 +43,7 @@
 		<def var = 'PopUpWidget.labelSpacing' value = '10' />
 		
 		<def var = 'ShowLauncherLogo' value = '1'/>
+		<def var = 'ShowGlobalMenuLogo' value = '1'/>
 		
 		<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
 
@@ -108,7 +109,7 @@
 					<widget name = 'LoadGameButton' 
 							type = 'Button'
 					/>
-					<space size = '16' />
+					<space size = '10' />
 					<widget name = 'AddGameButton' 
 							type = 'Button' 
 					/>
@@ -118,14 +119,14 @@
 					<widget name = 'RemoveGameButton' 
 							type = 'Button' 
 					/>
-					<space size = '16' />
+					<space size = '10' />
 					<widget name = 'OptionsButton' 
 							type = 'Button' 
 					/>
 					<widget name = 'AboutButton' 
 							type = 'Button' 
 					/>
-					<space size = '16' />
+					<space size = '10' />
 					<widget name = 'QuitButton' 
 							type = 'Button' 
 					/>
@@ -460,6 +461,41 @@
 		</layout>
 	</dialog>
 	
+	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'>
+			<widget name = 'Logo'
+					width = '210'
+					height = '40'
+			/>
+			<widget name = 'Version'
+					width = '210'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Resume'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '10'/>
+			<widget name = 'Options'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'About'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '10'/>
+			<widget name = 'RTL'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'Quit'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
+		</layout>
+	</dialog>
+	
 	<dialog name = 'ScummMain' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Resume'

Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx	2008-09-20 12:28:45 UTC (rev 34607)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx	2008-09-20 12:36:58 UTC (rev 34608)
@@ -34,6 +34,7 @@
 		<def var = 'PopUpWidget.labelSpacing' value = '6' />
 
 		<def var = 'ShowLauncherLogo' value = '0'/>
+		<def var = 'ShowGlobalMenuLogo' value = '0'/>
 		<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '0'/>
 
 		<widget name = 'Button'
@@ -445,6 +446,41 @@
 			</layout>
 		</layout>
 	</dialog>
+	
+	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' center = 'true'>
+			<widget name = 'Title'
+					width = '120'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Version'
+					width = '120'
+					height = 'Globals.Line.Height'
+			/>
+			<widget name = 'Resume'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '4'/>
+			<widget name = 'Options'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'About'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<space size = '4'/>
+			<widget name = 'RTL'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+			<widget name = 'Quit'
+					width = '70'
+					height = 'Globals.Button.Height'
+			/>
+		</layout>
+	</dialog>
 
 	<dialog name = 'ScummMain' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '4, 4, 4, 4'>


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