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

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Sun Aug 10 20:26:17 CEST 2008


Revision: 33764
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33764&view=rev
Author:   Tanoku
Date:     2008-08-10 18:26:14 +0000 (Sun, 10 Aug 2008)

Log Message:
-----------
Bugfix: Inverse layout reflowing.
Bugfix: Glitches with several layouts when using Aspect Ratio Correction.

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeEval.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeEval.h
    scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
    scummvm/branches/gsoc2008-gui/gui/themes/scummodern.stx
    scummvm/branches/gsoc2008-gui/gui/themes/scummodern.zip

Modified: scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp	2008-08-10 17:59:42 UTC (rev 33763)
+++ scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp	2008-08-10 18:26:14 UTC (rev 33764)
@@ -318,7 +318,7 @@
 }
 
 void SaveLoadChooser::reflowLayout() {
-	if (g_gui.evaluator()->getVar("scummsaveload_extinfo.visible") == 1) {
+	if (g_gui.xmlEval()->getVar("ScummSaveLoad.ExtInfo.Visible", 1) == 1) {
 		int16 x, y;
 		uint16 w, h;
 		
@@ -644,16 +644,16 @@
 };
 
 HelpDialog::HelpDialog(const GameSettings &game)
-	: ScummDialog("scummhelp"), _game(game) {
-	_title = new StaticTextWidget(this, "scummhelp_title", "");
+	: ScummDialog("ScummHelp"), _game(game) {
+	_title = new StaticTextWidget(this, "ScummHelp.Title", "");
 
 	_page = 1;
 
 	_numPages = ScummHelp::numPages(_game.id);
 
-	_prevButton = new GUI::ButtonWidget(this, "scummhelp_prev", "Previous", kPrevCmd, 'P');
-	_nextButton = new GUI::ButtonWidget(this, "scummhelp_next", "Next", kNextCmd, 'N');
-	new GUI::ButtonWidget(this, "scummhelp_close", "Close", kCloseCmd, 'C');
+	_prevButton = new GUI::ButtonWidget(this, "ScummHelp.Prev", "Previous", kPrevCmd, 'P');
+	_nextButton = new GUI::ButtonWidget(this, "ScummHelp.Next", "Next", kNextCmd, 'N');
+	new GUI::ButtonWidget(this, "ScummHelp.Close", "Close", kCloseCmd, 'C');
 	_prevButton->clearFlags(WIDGET_ENABLED);
 
 	// Dummy entries
@@ -670,19 +670,18 @@
 	_drawingHints &= ~GUI::THEME_HINT_SPECIAL_COLOR;
 
 	int lineHeight = g_gui.getFontHeight();
+	int16 x, y;
+	uint16 w, h;
+	
+	g_gui.xmlEval()->getWidgetData("ScummHelp.HelpText", x, y, w, h);
+	
+	int keyW = w * 20 / 100;
+	int dscX = x + keyW;
+	int dscW = w * 80 / 100;
 
-	int keyX = g_gui.evaluator()->getVar("scummhelp_key.x");
-	int keyYoff = g_gui.evaluator()->getVar("scummhelp_key.yoffset");
-	int keyW = g_gui.evaluator()->getVar("scummhelp_key.w");
-	int keyH = g_gui.evaluator()->getVar("scummhelp_key.h");
-	int dscX = g_gui.evaluator()->getVar("scummhelp_dsc.x");
-	int dscYoff = g_gui.evaluator()->getVar("scummhelp_dsc.yoffset");
-	int dscW = g_gui.evaluator()->getVar("scummhelp_dsc.w");
-	int dscH = g_gui.evaluator()->getVar("scummhelp_dsc.h");
-
 	for (int i = 0; i < HELP_NUM_LINES; i++) {
-		_key[i]->resize(keyX, keyYoff + lineHeight * (i + 2), keyW, keyH);
-		_dsc[i]->resize(dscX, dscYoff + lineHeight * (i + 2), dscW, dscH);
+		_key[i]->resize(x, y + lineHeight * i, keyW, lineHeight + 2);
+		_dsc[i]->resize(dscX, y + lineHeight * i, dscW, lineHeight + 2);
 	}
 
 	displayKeyBindings();

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeEval.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeEval.cpp	2008-08-10 17:59:42 UTC (rev 33763)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeEval.cpp	2008-08-10 18:26:14 UTC (rev 33764)
@@ -124,8 +124,11 @@
 		
 		if (autoWidget != -1 && autoWidget != (int)i) {
 			_children[autoWidget]->setHeight(_children[autoWidget]->getHeight() - (_children[i]->getHeight() + _spacing));
-			for (int j = autoWidget - 1; j >= 0; --j)
+			
+			if (_reverse) for (int j = autoWidget - 1; j >= 0; --j)
 				_children[j]->setY(-(_children[i]->getHeight() + _spacing));
+			else
+				_children[i]->setY(-2 * (_children[i]->getHeight() + _spacing));
 		} else {
 			_h += _children[i]->getHeight() + _spacing;
 		}
@@ -172,8 +175,11 @@
 
 		if (autoWidget != -1 && autoWidget != (int)i) {
 			_children[autoWidget]->setWidth(_children[autoWidget]->getWidth() - (_children[i]->getWidth() + _spacing));
-			for (int j = autoWidget - 1; j >= 0; --j)
+			
+			if (_reverse) for (int j = autoWidget - 1; j >= 0; --j)
 				_children[j]->setX(-(_children[i]->getWidth() + _spacing));
+			else
+				_children[i]->setX(-2 * (_children[i]->getWidth() + _spacing));
 		} else {
 			_w += _children[i]->getWidth() + _spacing;
 		}

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeEval.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeEval.h	2008-08-10 17:59:42 UTC (rev 33763)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeEval.h	2008-08-10 18:26:14 UTC (rev 33764)
@@ -377,7 +377,7 @@
 	}
 
 	void debugDraw(Graphics::Surface *screen, const Graphics::Font *font) {
-		_layouts["Dialog.Browser"]->debugDraw(screen, font);
+		_layouts["Dialog.Launcher"]->debugDraw(screen, font);
 //		_layouts["Dialog.GameOptions_Graphics"]->debugDraw(screen, font);
 	}
 	

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-08-10 17:59:42 UTC (rev 33763)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-08-10 18:26:14 UTC (rev 33764)
@@ -866,11 +866,11 @@
 		_textQueue.clear();
 	}
 		
-	renderDirtyScreen();
+//	renderDirtyScreen();
 
-	// _vectorRenderer->fillSurface();
-	// themeEval()->debugDraw(_screen, _font);
-	// _vectorRenderer->copyWholeFrame(_system);
+	_vectorRenderer->fillSurface();
+	themeEval()->debugDraw(_screen, _font);
+	_vectorRenderer->copyWholeFrame(_system);
 }
 
 void ThemeRenderer::renderDirtyScreen() {

Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummodern.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummodern.stx	2008-08-10 17:59:42 UTC (rev 33763)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummodern.stx	2008-08-10 18:26:14 UTC (rev 33764)
@@ -483,6 +483,8 @@
 		
 		<def var = 'ShowLauncherLogo' value = '1'/>
 		<def resolution = '320xY' var = 'ShowLauncherLogo' value = '0'/>
+		
+		<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
 
 		<widget name = 'OptionsLabel'
 				size = '110, Globals.Line.Height'
@@ -582,7 +584,7 @@
 			<widget name = 'Version'
 					height = 'Globals.Line.Height'
 			/>
-			<widget name = 'GameList' width = '304' height = '120'/>
+			<widget name = 'GameList'/>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6'>
 				<widget name = 'AddGameButton' 
 						width = '95'
@@ -1050,4 +1052,27 @@
 			</layout>
 		</layout>
 	</dialog>
+	
+	<dialog name = 'ScummHelp' overlays = 'screen_center'>
+		<layout type = 'vertical' padding = '8, 8, 8, 8' direction = 'bottom2top'>
+			<layout type = 'horizontal' padding = '0, 0, 16, 0'>
+				<widget name = 'Prev'
+						type = 'Button'
+				/>
+				<widget name = 'Next'
+						type = 'Button'
+				/>
+				<space size = '32'/>
+				<widget name = 'Close'
+						type = 'Button'
+				/>
+			</layout>
+			<widget name = 'HelpText'
+					height = '220'
+			/>
+			<widget name = 'Title'
+					height = 'Globals.Line.Height'
+			/>
+		</layout>
+	</dialog>
 </layout_info>
\ No newline at end of file


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