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

sev at users.sourceforge.net sev at users.sourceforge.net
Wed Mar 8 17:10:11 CET 2006


Revision: 21147
Author:   sev
Date:     2006-03-08 17:08:25 -0800 (Wed, 08 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21147&view=rev

Log Message:
-----------
Converted all scumm dialogs to new scheme

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/dialogs.cpp
    scummvm/trunk/engines/scumm/dialogs.h
    scummvm/trunk/gui/browser.cpp
    scummvm/trunk/gui/eval.cpp
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/message.cpp
    scummvm/trunk/gui/newgui.cpp
    scummvm/trunk/gui/theme-config.cpp
    scummvm/trunk/gui/themes/default-theme.ini
    scummvm/trunk/gui/widget.cpp
    scummvm/trunk/gui/widget.h
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/engines/scumm/dialogs.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -211,8 +211,8 @@
 
 #pragma mark -
 
-ScummDialog::ScummDialog(ScummEngine *scumm, int x, int y, int w, int h)
-	: GUI::Dialog(x, y, w, h), _vm(scumm) {
+ScummDialog::ScummDialog(ScummEngine *scumm, String name)
+	: GUI::Dialog(name), _vm(scumm) {
 _drawingHints |= GUI::THEME_HINT_SPECIAL_COLOR;
 }
 
@@ -353,27 +353,29 @@
 };
 
 SaveLoadChooserEx::SaveLoadChooserEx(const String &title, const String &buttonLabel, bool saveMode, ScummEngine *engine)
-	: Dialog(8, 8, engine->_system->getOverlayWidth() - 2 * 8, engine->_system->getOverlayHeight() - 16), _saveMode(saveMode), _list(0), _chooseButton(0), _gfxWidget(0), _scumm(engine) {
+	: Dialog("scummsaveload"), _saveMode(saveMode), _list(0), _chooseButton(0), _gfxWidget(0), _scumm(engine) {
 
-	new StaticTextWidget(this, 10, 6, _w - 2 * 10, kLineHeight, title, kTextAlignCenter);
+	new StaticTextWidget(this, "scummsaveload_title", title, kTextAlignCenter);
 
 	// Add choice list
-	_list = new GUI::ListWidget(this, 10, 18, _w - 2 * 10 - 180, _h - 14 - kBigButtonHeight - 18, GUI::kBigWidgetSize);
+	_list = new GUI::ListWidget(this, "scummsaveload_list");
 	_list->setEditable(saveMode);
 	_list->setNumberingMode(saveMode ? GUI::kListNumberingOne : GUI::kListNumberingZero);
 
+	int thumbX = g_gui.evaluator()->getVar("scummsaveload_thumbnail.x");
+	int thumbY = g_gui.evaluator()->getVar("scummsaveload_thumbnail.y");
+
 	// Add the thumbnail display
 	_gfxWidget = new GUI::GraphicsWidget(this,
-			_w - (kThumbnailWidth + 22),
-			18,
+			thumbX, thumbY,
 			kThumbnailWidth + 8,
 			((_scumm->_system->getHeight() % 200 && _scumm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8);
 	_gfxWidget->setFlags(GUI::WIDGET_BORDER);
 
-	int height = 18 + ((_scumm->_system->getHeight() % 200 && _scumm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8;
+	int height = thumbY + ((_scumm->_system->getHeight() % 200 && _scumm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8;
 
 	_date = new StaticTextWidget(this,
-					_w - (kThumbnailWidth + 22),
+					thumbX,
 					height,
 					kThumbnailWidth + 8,
 					kLineHeight,
@@ -384,7 +386,7 @@
 	height += kLineHeight;
 
 	_time = new StaticTextWidget(this,
-					_w - (kThumbnailWidth + 22),
+					thumbX,
 					height,
 					kThumbnailWidth + 8,
 					kLineHeight,
@@ -395,7 +397,7 @@
 	height += kLineHeight;
 
 	_playtime = new StaticTextWidget(this,
-					_w - (kThumbnailWidth + 22),
+					thumbX,
 					height,
 					kThumbnailWidth + 8,
 					kLineHeight,
@@ -404,8 +406,8 @@
 	_playtime->setFlags(GUI::WIDGET_CLEARBG);
 
 	// Buttons
-	addButton(this, _w - 2 * (kBigButtonWidth + 10), _h - kBigButtonHeight - 8, "Cancel", kCloseCmd, 0, GUI::kBigWidgetSize);
-	_chooseButton = addButton(this, _w - (kBigButtonWidth + 10), _h - kBigButtonHeight - 8, buttonLabel, kChooseCmd, 0, GUI::kBigWidgetSize);
+	new GUI::ButtonWidget(this, "scummsaveload_cancel", "Cancel", kCloseCmd, 0);
+	_chooseButton = new GUI::ButtonWidget(this, "scummsaveload_choose", buttonLabel, kChooseCmd, 0);
 	_chooseButton->setEnabled(false);
 }
 
@@ -524,67 +526,22 @@
 	return l;
 }
 
-#define addBigButton(label, cmd, hotkey) \
-	new GUI::ButtonWidget(this, hOffset, y, buttonWidth, buttonHeight, label, cmd, hotkey, ws); \
-	y += (buttonHeight + vAddOff)
-
 MainMenuDialog::MainMenuDialog(ScummEngine *scumm)
-	: ScummDialog(scumm, 0, 0, 0, 0) {
+	: ScummDialog(scumm, "scummmain") {
 
-	const int screenW = g_system->getOverlayWidth();
-	const int screenH = g_system->getOverlayHeight();
+	new GUI::ButtonWidget(this, "scummmain_resume", "Resume", kPlayCmd, 'P');
 
-	int hOffset;
-	int vSpace;
-	int vAddOff;
+	new GUI::ButtonWidget(this, "scummmain_load", "Load", kLoadCmd, 'L');
+	new GUI::ButtonWidget(this, "scummmain_save", "Save", kSaveCmd, 'S');
 
-	GUI::WidgetSize ws;
-	int buttonWidth;
-	int buttonHeight;
-
-	if (screenW >= 400 && screenH >= 300) {
-		buttonWidth = 160;
-		buttonHeight = 28;
-		ws = GUI::kBigWidgetSize;
-		hOffset = 12;
-		vSpace = 7;
-		vAddOff = 3;
-	} else {
-		buttonWidth = 90;
-		buttonHeight = 16;
-		ws = GUI::kNormalWidgetSize;
-		hOffset = 8;
-		vSpace = 5;
-		vAddOff = 2;
-	}
-
-	int y = vSpace + vAddOff;
-
-
-	addBigButton("Resume", kPlayCmd, 'P');
-	y += vSpace;
-
-	addBigButton("Load", kLoadCmd, 'L');
-	addBigButton("Save", kSaveCmd, 'S');
-	y += vSpace;
-
-	addBigButton("Options", kOptionsCmd, 'O');
+	new GUI::ButtonWidget(this, "scummmain_options", "Options", kOptionsCmd, 'O');
 #ifndef DISABLE_HELP
-	addBigButton("Help", kHelpCmd, 'H');
+	new GUI::ButtonWidget(this, "scummmain_help", "Help", kHelpCmd, 'H');
 #endif
-	addBigButton("About", kAboutCmd, 'A');
-	y += vSpace;
+	new GUI::ButtonWidget(this, "scummmain_about", "About", kAboutCmd, 'A');
 
-	addBigButton("Quit", kQuitCmd, 'Q');
+	new GUI::ButtonWidget(this, "scummmain_quit", "Quit", kQuitCmd, 'Q');
 
-
-	_w = buttonWidth + 2 * hOffset;
-	_h = y + vSpace;
-
-	_x = (screenW - _w) / 2;
-	_y = (screenH - _h) / 2;
-
-
 	//
 	// Create the sub dialog(s)
 	//
@@ -683,68 +640,31 @@
 };
 
 ConfigDialog::ConfigDialog(ScummEngine *scumm)
-	: GUI::OptionsDialog("", 40, 30, 240, 124), _vm(scumm) {
+	: GUI::OptionsDialog("", "scummconfig"), _vm(scumm) {
 
-	const int screenW = g_system->getOverlayWidth();
-	const int screenH = g_system->getOverlayHeight();
-
-	_w = screenW - 2 * 40;
-
-	GUI::WidgetSize ws;
-	int buttonWidth;
-	int buttonHeight;
-	int sliderHeight;
-
-	if (screenW >= 400 && screenH >= 300) {
-		ws = GUI::kBigWidgetSize;
-		buttonWidth = kBigButtonWidth;
-		buttonHeight = kBigButtonHeight;
-		sliderHeight = GUI::kBigSliderHeight;
-	} else {
-		ws = GUI::kNormalWidgetSize;
-		buttonWidth = kButtonWidth;
-		buttonHeight = kButtonHeight;
-		sliderHeight = GUI::kSliderHeight;
-	}
-
-	int yoffset = 8;
-
 	//
 	// Sound controllers
 	//
 
-	addVolumeControls(this, "scummoptions_");
-	yoffset += (sliderHeight + 4) * 8;
+	addVolumeControls(this, "scummconfig_");
 
 	//
 	// Some misc options
 	//
 
-	_subtitlesCheckbox = addCheckbox(this, 15, yoffset, "Show subtitles", 0, 'S', ws);
-	yoffset += _subtitlesCheckbox->getHeight();
+	_subtitlesCheckbox = new GUI::CheckboxWidget(this, "scummconfig_subtitlesCheckbox", "Show subtitles", 0, 'S');
+	_speechCheckbox = new GUI::CheckboxWidget(this, "scummconfig_speechCheckbox", "Enable speech", 0, 'E');
 
-	_speechCheckbox = addCheckbox(this, 15, yoffset, "Enable speech", 0, 'E', ws);
-	yoffset += _speechCheckbox->getHeight() + 4;
-
 	//
 	// Add the buttons
 	//
 
-	_w = 8 + 3 * (buttonWidth + 4); // FIXME/TODO
-
-	addButton(this, _w - (buttonWidth + 4) - 4, yoffset, "OK", GUI::OptionsDialog::kOKCmd, 'O', ws);
-	addButton(this, _w - 2 * (buttonWidth + 4) - 4, yoffset, "Cancel", kCloseCmd, 'C', ws);
+	new GUI::ButtonWidget(this, "scummconfig_ok", "OK", GUI::OptionsDialog::kOKCmd, 'O');
+	new GUI::ButtonWidget(this, "scummconfig_cancel", "Cancel", kCloseCmd, 'C');
 #ifdef SMALL_SCREEN_DEVICE
-	addButton(this, _w - 3 * (buttonWidth + 4) - 4, yoffset, "Keys", kKeysCmd, 'K', ws);
+	new GUI::ButtonWidget(this, "scummconfig_keys", "Keys", kKeysCmd, 'K');
 #endif
 
-	yoffset += buttonHeight;
-
-	_h = yoffset + 8;
-
-	_x = (screenW - _w) / 2;
-	_y = (screenH - _h) / 2;
-
 #ifdef SMALL_SCREEN_DEVICE
 	//
 	// Create the sub dialog(s)
@@ -810,50 +730,32 @@
 };
 
 HelpDialog::HelpDialog(ScummEngine *scumm)
-	: ScummDialog(scumm, 5, 5, 310, 190) {
+	: ScummDialog(scumm, "scummhelp") {
 	_drawingHints &= ~GUI::THEME_HINT_SPECIAL_COLOR;
 
-	const int screenW = g_system->getOverlayWidth();
-	const int screenH = g_system->getOverlayHeight();
-
-	GUI::WidgetSize ws;
-	int buttonHeight;
-	int buttonWidth;
-
-	if (screenW >= 400 && screenH >= 300) {
-		ws = GUI::kBigWidgetSize;
-		buttonHeight = kBigButtonHeight;
-		buttonWidth = kBigButtonWidth;
-		_w = 370;
-		_x = (screenW - _w) / 2;
-	} else {
-		ws = GUI::kNormalWidgetSize;
-		buttonHeight = kButtonHeight;
-		buttonWidth = kButtonWidth;
-		_x = 5;
-		_w = screenW - 2 * 5;
-	}
-
 	int lineHeight = g_gui.getFontHeight();
 
-	_h = 5 + (2 + HELP_NUM_LINES) * lineHeight + buttonHeight + 7;
-	_y = (screenH - _h) / 2;
+	_title = new StaticTextWidget(this, "scummhelp_title", "", kTextAlignCenter);
+	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");
 
-	_title = new StaticTextWidget(this, 10, 5, _w, lineHeight, "", kTextAlignCenter, ws);
-
 	for (int i = 0; i < HELP_NUM_LINES; i++) {
-		_key[i] = new StaticTextWidget(this, 10, 5 + lineHeight * (i + 2), 80, lineHeight, "", kTextAlignLeft, ws);
-		_dsc[i] = new StaticTextWidget(this, 90, 5 + lineHeight * (i + 2), _w - 10 - 90, lineHeight, "", kTextAlignLeft, ws);
+		_key[i] = new StaticTextWidget(this, keyX, keyYoff + lineHeight * (i + 2), keyW, keyH, "", kTextAlignLeft);
+		_dsc[i] = new StaticTextWidget(this, dscX, dscYoff + lineHeight * (i + 2), dscW, dscH, "", kTextAlignLeft);
 	}
 
 	_page = 1;
 	_numPages = ScummHelp::numPages(scumm->_game.id);
 
-	int y = 5 + lineHeight * (HELP_NUM_LINES + 2) + 2;
-
-	_prevButton = addButton(this, 10, y, "Previous", kPrevCmd, 'P', ws);
-	_nextButton = addButton(this, 10 + buttonWidth + 8, y, "Next", kNextCmd, 'N', ws);
-	addButton(this, _w - 8 - buttonWidth, y, "Close", kCloseCmd, 'C', ws);
+	_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);
 
 	displayKeyBindings();
@@ -910,26 +812,19 @@
 #pragma mark -
 
 InfoDialog::InfoDialog(ScummEngine *scumm, int res)
-: ScummDialog(scumm, 0, 80, 0, 16) { // dummy x and w
+: ScummDialog(scumm, "scummDummyDialog") { // dummy x and w
 	setInfoText(queryResString (res));
 }
 
 InfoDialog::InfoDialog(ScummEngine *scumm, const String& message)
-: ScummDialog(scumm, 0, 80, 0, 16) { // dummy x and w
+: ScummDialog(scumm, "scummDummyDialog") { // dummy x and w
 	setInfoText(message);
 }
 
 void InfoDialog::setInfoText(const String& message) {
 	const int screenW = g_system->getOverlayWidth();
 	const int screenH = g_system->getOverlayHeight();
-	GUI::WidgetSize ws;
 
-	if (screenW >= 400 && screenH >= 300) {
-		ws = GUI::kBigWidgetSize;
-	} else {
-		ws = GUI::kNormalWidgetSize;
-	}
-
 	int width = g_gui.getStringWidth(message) + 16;
 	int height = g_gui.getFontHeight() + 8;
 
@@ -938,7 +833,7 @@
 	_x = (screenW - width) / 2;
 	_y = (screenH - height) / 2;
 
-	new StaticTextWidget(this, 4, 4, _w - 8, _h, message, kTextAlignCenter, ws);
+	new StaticTextWidget(this, 4, 4, _w - 8, _h, message, kTextAlignCenter);
 }
 
 #pragma mark -
@@ -972,13 +867,13 @@
 #pragma mark -
 
 ValueDisplayDialog::ValueDisplayDialog(const Common::String& label, int minVal, int maxVal, int val, uint16 incKey, uint16 decKey)
-	: GUI::Dialog(0, 80, 0, 16), _label(label), _min(minVal), _max(maxVal), _value(val), _incKey(incKey), _decKey(decKey) {
+	: GUI::Dialog("scummDummyDialog"), _label(label), _min(minVal), _max(maxVal), _value(val), _incKey(incKey), _decKey(decKey) {
 	assert(_min <= _value && _value <= _max);
 
 	const int screenW = g_system->getOverlayWidth();
 	const int screenH = g_system->getOverlayHeight();
 
-	if (screenW >= 400 && screenH >= 300) {
+	if (g_gui.getWidgetSize() == GUI::kBigWidgetSize) {
 		_percentBarWidth = kBigPercentBarWidth;
 	} else {
 		_percentBarWidth = kPercentBarWidth;

Modified: scummvm/trunk/engines/scumm/dialogs.h
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.h	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/engines/scumm/dialogs.h	2006-03-09 01:08:25 UTC (rev 21147)
@@ -42,7 +42,7 @@
 
 class ScummDialog : public GUI::Dialog {
 public:
-	ScummDialog(ScummEngine *scumm, int x, int y, int w, int h);
+	ScummDialog(ScummEngine *scumm, Common::String name);
 
 protected:
 	typedef Common::String String;

Modified: scummvm/trunk/gui/browser.cpp
===================================================================
--- scummvm/trunk/gui/browser.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/browser.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -160,10 +160,10 @@
 	_currentPath = NULL;
 
 	// Headline - TODO: should be customizable during creation time
-	new StaticTextWidget(this, 10, kLineHeight, _w - 2 * 10, kLineHeight, title, kTextAlignCenter, ws);
+	new StaticTextWidget(this, 10, kLineHeight, _w - 2 * 10, kLineHeight, title, kTextAlignCenter);
 
 	// Current path - TODO: handle long paths ?
-	_currentPath = new StaticTextWidget(this, 10, 2 * kLineHeight, _w - 2 * 10, kLineHeight, "DUMMY", kTextAlignLeft, ws);
+	_currentPath = new StaticTextWidget(this, 10, 2 * kLineHeight, _w - 2 * 10, kLineHeight, "DUMMY", kTextAlignLeft);
 
 	// Add file list
 	_fileList = new ListWidget(this, 10, 3 * kLineHeight, _w - 2 * 10, _h - 3 * kLineHeight - buttonHeight - 14, ws);

Modified: scummvm/trunk/gui/eval.cpp
===================================================================
--- scummvm/trunk/gui/eval.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/eval.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -26,6 +26,8 @@
 #include "gui/widget.h"
 #include "gui/newgui.h"
 
+#include "graphics/scaler.h"
+
 namespace GUI {
 
 static bool isdelim(char c) {
@@ -45,7 +47,7 @@
 int Eval::eval(const String &input, const String &section, const String &name, int startpos) {
 	int result;
 
-	debug(3, "<%s>", input.c_str());
+	debug(3, "%s=%s", name.c_str(), input.c_str());
 
 	strncpy(_input, input.c_str(), 256);
 	_section = section;
@@ -240,6 +242,8 @@
 	{"kNormalWidgetSize", GUI::kNormalWidgetSize},
 	{"kBigWidgetSize", GUI::kBigWidgetSize},
 
+	{"kThumbnailWidth", kThumbnailWidth},
+
 	{"false", 0},
 	{"true", 1},
 	{NULL, 0}

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/launcher.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -191,12 +191,12 @@
 	yoffset = vBorder;
 
 	// GUI:  Label & edit widget for the game ID
-	new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "ID: ", kTextAlignRight, ws);
+	new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "ID: ", kTextAlignRight);
 	_domainWidget = new DomainEditTextWidget(tab, x + labelWidth, yoffset, _w - labelWidth - 10 - x, kLineHeight, _domain, ws);
 	yoffset += _domainWidget->getHeight() + 3;
 
 	// GUI:  Label & edit widget for the description
-	new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "Name: ", kTextAlignRight, ws);
+	new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "Name: ", kTextAlignRight);
 	_descriptionWidget = new EditTextWidget(tab, x + labelWidth, yoffset, _w - labelWidth - 10 - x, kLineHeight, description, ws);
 	yoffset += _descriptionWidget->getHeight() + 3;
 
@@ -229,12 +229,12 @@
 
 	// GUI:  Button + Label for the game path
 	new ButtonWidget(tab, x, yoffset, buttonWidth + 5, buttonHeight, "Game Path: ", kCmdGameBrowser, 0, ws);
-	_gamePathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, gamePath, kTextAlignLeft, ws);
+	_gamePathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, gamePath, kTextAlignLeft);
 	yoffset += buttonHeight + 4;
 
 	// GUI:  Button + Label for the additional path
 	new ButtonWidget(tab, x, yoffset, buttonWidth + 5, buttonHeight, "Extra Path:", kCmdExtraBrowser, 0, ws);
-	_extraPathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, extraPath, kTextAlignLeft, ws);
+	_extraPathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, extraPath, kTextAlignLeft);
 	if (extraPath.isEmpty() || !ConfMan.hasKey("extrapath", _domain)) {
 		_extraPathWidget->setLabel("None");
 	}
@@ -242,7 +242,7 @@
 
 	// GUI:  Button + Label for the save path
 	new ButtonWidget(tab, x, yoffset, buttonWidth + 5, buttonHeight, "Save Path: ", kCmdSaveBrowser, 0, ws);
-	_savePathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, savePath, kTextAlignLeft, ws);
+	_savePathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, savePath, kTextAlignLeft);
 	if (savePath.isEmpty() || !ConfMan.hasKey("savepath", _domain)) {
 		_savePathWidget->setLabel("Default");
 	}

Modified: scummvm/trunk/gui/message.cpp
===================================================================
--- scummvm/trunk/gui/message.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/message.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -83,7 +83,7 @@
 	// Each line is represented by one static text item.
 	for (int i = 0; i < lineCount; i++) {
 		new StaticTextWidget(this, 10, 10 + i * kLineHeight, maxlineWidth, kLineHeight,
-								lines[i], kTextAlignCenter, ws);
+								lines[i], kTextAlignCenter);
 	}
 
 	// FIXME - allow for more than two buttons, and return in runModal() which one

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/newgui.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -58,10 +58,13 @@
 
 // HACK. FIXME. This doesn't belong here. But otherwise it creates compulation problems
 GuiObject::GuiObject(Common::String name) : _firstWidget(0) {
-	_x = g_gui.evaluator()->getVar(name + ".x");
-	_y = g_gui.evaluator()->getVar(name + ".y");
+	if ((_x = g_gui.evaluator()->getVar(name + ".x")) == EVAL_UNDEF_VAR)
+		error("Undefined variable %s.x", name.c_str());
+	if ((_y = g_gui.evaluator()->getVar(name + ".y")) == EVAL_UNDEF_VAR)
+		error("Undefined variable %s.y", name.c_str());
 	_w = g_gui.evaluator()->getVar(name + ".w");
 	_h = g_gui.evaluator()->getVar(name + ".h");
+
 	_name = name;
 }
 

Modified: scummvm/trunk/gui/theme-config.cpp
===================================================================
--- scummvm/trunk/gui/theme-config.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/theme-config.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -37,6 +37,13 @@
 def_globOptionsW=(w - 2 * 10)\n\
 def_globOptionsH=(h - 1 * 40)\n\
 def_tabPopupsLabelW=100\n\
+def_scummmainHOffset=8\n\
+def_scummmainVSpace=5\n\
+def_scummmainVAddOff=2\n\
+def_scummmainButtonWidth=90\n\
+def_scummmainButtonHeight=16\n\
+def_scummhelpX=5\n\
+def_scummhelpW=(w - 2 * 5)\n\
 def_midiControlsSpacing=1\n\
 use=XxY\n\
 \n\
@@ -51,11 +58,18 @@
 def_globOptionsW=(w - 2 * 10)\n\
 def_globOptionsH=(h - 2 * 40)\n\
 def_tabPopupsLabelW=150\n\
+def_scummmainHOffset=12\n\
+def_scummmainVSpace=7\n\
+def_scummmainVAddOff=3\n\
+def_scummmainButtonWidth=160\n\
+def_scummmainButtonHeight=28\n\
+def_scummhelpW=370\n\
+def_scummhelpX=((w - scummhelpW) / 2)\n\
 def_midiControlsSpacing=2\n\
 chooser_headline=10 6 (w - 2 * 16) (kLineHeight)\n\
 chooser_list=10 (6 + kLineHeight + 2) (w - 2 * 16) (h - self.y - buttonHeight - 12)\n\
 \n\
-## launcher\n\
+##### launcher\n\
 hBorder=10\n\
 launcher_version=hBorder 8 (w - 2 * hBorder) kLineHeight\n\
 top=(h - 8 - buttonHeight)\n\
@@ -63,23 +77,23 @@
 space=8\n\
 butWidth=((w - 2 * hBorder - space * (numButtons - 1)) / numButtons)\n\
 launcher_quit_button=hBorder top butWidth buttonHeight\n\
-launcher_about_button=(prev.x2 + space) top butWidth buttonHeight\n\
-launcher_options_button=(prev.x2 + space) top butWidth buttonHeight\n\
-launcher_start_button=(prev.x2 + space) top butWidth buttonHeight\n\
+launcher_about_button=(prev.x2 + space) prev.y prev.w prev.h\n\
+launcher_options_button=(prev.x2 + space) prev.y prev.w prev.h\n\
+launcher_start_button=(prev.x2 + space) prev.y prev.w prev.h\n\
 top=(top - buttonHeight * 2)\n\
 numButtons=3\n\
 space=10\n\
 butWidth=((w - 2 * hBorder - space * (numButtons - 1)) / numButtons)\n\
 launcher_addGame_button=hBorder top butWidth buttonHeight\n\
-launcher_editGame_button=(prev.x2 + space) top butWidth buttonHeight\n\
-launcher_removeGame_button=(prev.x2 + space) top butWidth buttonHeight\n\
+launcher_editGame_button=(prev.x2 + space) prev.y prev.w prev.h\n\
+launcher_removeGame_button=(prev.x2 + space) prev.y prev.w prev.h\n\
 launcher_list=hBorder (kLineHeight + 16) (w - 2 * hBorder) (top - kLineHeight - 20)\n\
 \n\
-# global options\n\
+### global options\n\
 globaloptions=10 40 globOptionsW globOptionsH\n\
 set_parent=globaloptions\n\
 vBorder=5\n\
-globaloptions_tabwidget=0, vBorder parent.w (parent.h - buttonHeight -8 - 2 * vBorder)\n\
+globaloptions_tabwidget=0, vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)\n\
 \n\
 # graphics tab\n\
 opYoffset=vBorder\n\
@@ -100,17 +114,17 @@
 # paths tab\n\
 yoffset=vBorder\n\
 globaloptions_savebutton=5 yoffset (buttonWidth + 5) buttonHeight\n\
-globaloptions_savepath=(prev.x2 + 20) (vBorder + 3) (parent.w - (5 + buttonWidth + 20) - 10) kLineHeight\n\
+globaloptions_savepath=(prev.x2 + 20) (vBorder + 3) (parent.w - (prev.w + 20) - 10) kLineHeight\n\
 yoffset=(yoffset + buttonHeight + 4)\n\
 globaloptions_extrabutton=5 yoffset (buttonWidth + 5) buttonHeight\n\
-globaloptions_extrapath=(prev.x2 + 20) (vBorder + 3) (parent.w - (5 + buttonWidth + 20) - 10) kLineHeight\n\
+globaloptions_extrapath=(prev.x2 + 20) (vBorder + 3) (parent.w - (prev.w + 20) - 10) kLineHeight\n\
 yoffset=(yoffset + buttonHeight + 4)\n\
 globaloptions_keysbutton=5 yoffset buttonWidth buttonHeight\n\
 \n\
-globaloptions_ok=(parent.w - (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n\
 globaloptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n\
+globaloptions_ok=(prev.x2 + 10) prev.y prev.w prev.h\n\
 \n\
-# game options\n\
+### game options\n\
 opYoffset=(vBorder + buttonHeight)\n\
 opWidth=globOptionsW\n\
 useWithPrefix=graphicsControls gameoptions_\n\
@@ -124,20 +138,86 @@
 opYoffset=(vBorder + buttonHeight)\n\
 useWithPrefix=midiControls gameoptions_\n\
 \n\
-### SCUMM game options\n\
+##### SCUMM dialogs\n\
+scummDummyDialog=0 80 0 16\n\
+\n\
+## Main dialog\n\
+# note that scummmain size depends on overall height\n\
+smY=(scummmainVSpace + scummmainVAddOff)\n\
+scummmain_resume=scummmainHOffset smY scummmainButtonWidth scummmainButtonHeight\n\
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)\n\
+smY=(smY + scummmainVSpace)\n\
+scummmain_load=prev.x smY prev.w prev.h\n\
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)\n\
+scummmain_save=prev.x smY prev.w prev.h\n\
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)\n\
+smY=(smY + scummmainVSpace)\n\
+scummmain_options=prev.x smY prev.w prev.h\n\
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)\n\
+scummmain_help=prev.x smY prev.w prev.h\n\
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)\n\
+scummmain_about=prev.x smY prev.w prev.h\n\
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)\n\
+smY=(smY + scummmainVSpace)\n\
+scummmain_quit=prev.x smY prev.w prev.h\n\
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)\n\
+smW=(scummmainButtonWidth + 2 * scummmainHOffset)\n\
+smH=(smY + scummmainVSpace)\n\
+scummmain=((w - smW) / 2) ((h - smH) / 2) smW smH\n\
+\n\
+## Engine config\n\
+# note that scummconfig size depends on overall height\n\
+# hence it is on the end of the list\n\
 opYoffset=8\n\
-useWithPrefix=volumeControls scummoptions_\n\
+useWithPrefix=volumeControls scummconfig_\n\
+scummconfig_subtitlesCheckbox=15 opYoffset (kFontHeight + 10 + 89) buttonHeight\n\
+opYoffset=(opYoffset + buttonHeight)\n\
+scummconfig_speechCheckbox=prev.x opYoffset (kFontHeight + 10 + 85) buttonHeight\n\
+opYoffset=(opYoffset + buttonHeight + 4)\n\
+soWidth=(8 + 3 * buttonWidth + 4)\n\
+scummconfig_keys=(soWidth - 3 * (buttonWidth + 4) - 4) opYoffset buttonWidth buttonHeight\n\
+scummconfig_cancel=(prev.x2 + 4) prev.y prev.w prev.h\n\
+scummconfig_ok=(prev.x2 + 4) prev.y prev.w prev.h\n\
+opYoffset=(opYoffset + buttonHeight)\n\
+scummconfig=((w - soWidth) / 2) ((h - opYoffset) / 2) soWidth (opYoffset + 8)\n\
 \n\
+## Help\n\
+scummHelpNumLines=15\n\
+shH=(5 + (2 + scummHelpNumLines) * kFontHeight + buttonHeight + 7)\n\
+scummhelp=scummhelpX ((h - shH) / 2) scummhelpW shH\n\
+scummhelp_title=10 5 scummhelpW kFontHeight\n\
+scummhelp_key.x=10\n\
+scummhelp_key.yoffset=5\n\
+scummhelp_key.w=80\n\
+scummhelp_key.h=kFontHeight\n\
+scummhelp_dsc.x=90\n\
+scummhelp_dsc.yoffset=5\n\
+scummhelp_dsc.w=(scummhelpW - 10 - 90)\n\
+scummhelp_dsc.h=kFontHeight\n\
+scummhelp_prev=10 (5 + kFontHeight * (scummHelpNumLines + 2) + 2) buttonWidth buttonHeight\n\
+scummhelp_next=(prev.x2 + 8) prev.y prev.w prev.h\n\
+scummhelp_close=(scummhelpW - 8 - buttonWidth) prev.y prev.w prev.h\n\
+\n\
+# Saveload dialog\n\
+scummsaveload=8 8 (w - 2 * 8) (h - 16)\n\
+set_parent=scummsaveload\n\
+scummsaveload_title=10 6 (parent.w - 2 * 10) kLineHeight\n\
+scummsaveload_list=10 18 (parent.w - 2 * 10 - 180) (parent.h - 14 - buttonHeight - 18)\n\
+scummsaveload_thumbnail=(parent.w - (kThumbnailWidth + 22)) 18\n\
+scummsaveload_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n\
+scummsaveload_choose=(prev.x2 + 10) prev.y prev.w prev.h\n\
+\n\
+############################################\n\
 [graphicsControls]\n\
 gcx=10\n\
 gcw=(opWidth - 2 * 10)\n\
 grModePopup=(gcx - 5) opYoffset (gcw + 5) kLineHeight\n\
 opYoffset=(opYoffset + kLineHeight + 4)\n\
-grRenderPopup=(gcx - 5) opYoffset (gcw + 5) kLineHeight\n\
+grRenderPopup=prev.x opYoffset prev.w prev.h\n\
 opYoffset=(opYoffset + kLineHeight + 4)\n\
 grFullscreenCheckbox=gcx opYoffset (kFontHeight + 10 + 96) buttonHeight\n\
 opYoffset=(opYoffset + buttonHeight)\n\
-grAspectCheckbox=gcx opYoffset (kFontHeight + 10 + 136) buttonHeight\n\
+grAspectCheckbox=prev.x opYoffset (kFontHeight + 10 + 136) prev.h\n\
 opYoffset=(opYoffset + buttonHeight)\n\
 \n\
 [audioControls]\n\
@@ -200,7 +280,7 @@
 
 	for (i = 0; i < str.size(); i++) {
 		if (isspace(str[i]) && level == 0) {
-			value = _evaluator->eval(String(&(str.c_str()[start]), i - start), section, name, start);
+			value = _evaluator->eval(String(&(str.c_str()[start]), i - start), section, name + "." + postfixes[npostfix], start);
 			_evaluator->setVariable(prefix + name + "." + postfixes[npostfix++], value);
 			start = i + 1;
 		}
@@ -220,7 +300,7 @@
 		error("Missing ')' in section: [%s] expression: \"%s\" start is at: %d",
 			  section.c_str(), name.c_str(), start);
 
-	value = _evaluator->eval(String(&(str.c_str()[start]), i - start), section, name, start);
+	value = _evaluator->eval(String(&(str.c_str()[start]), i - start), section, name + "." + postfixes[npostfix], start);
 
 	// process VAR=VALUE construct
 	if (npostfix == 0)

Modified: scummvm/trunk/gui/themes/default-theme.ini
===================================================================
--- scummvm/trunk/gui/themes/default-theme.ini	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/themes/default-theme.ini	2006-03-09 01:08:25 UTC (rev 21147)
@@ -141,6 +141,13 @@
 def_globOptionsW=(w - 2 * 10)
 def_globOptionsH=(h - 1 * 40)
 def_tabPopupsLabelW=100
+def_scummmainHOffset=8
+def_scummmainVSpace=5
+def_scummmainVAddOff=2
+def_scummmainButtonWidth=90
+def_scummmainButtonHeight=16
+def_scummhelpX=5
+def_scummhelpW=(w - 2 * 5)
 def_midiControlsSpacing=1
 use=XxY
 
@@ -155,11 +162,18 @@
 def_globOptionsW=(w - 2 * 10)
 def_globOptionsH=(h - 2 * 40)
 def_tabPopupsLabelW=150
+def_scummmainHOffset=12
+def_scummmainVSpace=7
+def_scummmainVAddOff=3
+def_scummmainButtonWidth=160
+def_scummmainButtonHeight=28
+def_scummhelpW=370
+def_scummhelpX=((w - scummhelpW) / 2)
 def_midiControlsSpacing=2
 chooser_headline=10 6 (w - 2 * 16) (kLineHeight)
 chooser_list=10 (6 + kLineHeight + 2) (w - 2 * 16) (h - self.y - buttonHeight - 12)
 
-## launcher
+##### launcher
 hBorder=10
 launcher_version=hBorder 8 (w - 2 * hBorder) kLineHeight
 top=(h - 8 - buttonHeight)
@@ -167,23 +181,23 @@
 space=8
 butWidth=((w - 2 * hBorder - space * (numButtons - 1)) / numButtons)
 launcher_quit_button=hBorder top butWidth buttonHeight
-launcher_about_button=(prev.x2 + space) top butWidth buttonHeight
-launcher_options_button=(prev.x2 + space) top butWidth buttonHeight
-launcher_start_button=(prev.x2 + space) top butWidth buttonHeight
+launcher_about_button=(prev.x2 + space) prev.y prev.w prev.h
+launcher_options_button=(prev.x2 + space) prev.y prev.w prev.h
+launcher_start_button=(prev.x2 + space) prev.y prev.w prev.h
 top=(top - buttonHeight * 2)
 numButtons=3
 space=10
 butWidth=((w - 2 * hBorder - space * (numButtons - 1)) / numButtons)
 launcher_addGame_button=hBorder top butWidth buttonHeight
-launcher_editGame_button=(prev.x2 + space) top butWidth buttonHeight
-launcher_removeGame_button=(prev.x2 + space) top butWidth buttonHeight
+launcher_editGame_button=(prev.x2 + space) prev.y prev.w prev.h
+launcher_removeGame_button=(prev.x2 + space) prev.y prev.w prev.h
 launcher_list=hBorder (kLineHeight + 16) (w - 2 * hBorder) (top - kLineHeight - 20)
 
-# global options
+### global options
 globaloptions=10 40 globOptionsW globOptionsH
 set_parent=globaloptions
 vBorder=5
-globaloptions_tabwidget=0, vBorder parent.w (parent.h - buttonHeight -8 - 2 * vBorder)
+globaloptions_tabwidget=0, vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)
 
 # graphics tab
 opYoffset=vBorder
@@ -204,17 +218,17 @@
 # paths tab
 yoffset=vBorder
 globaloptions_savebutton=5 yoffset (buttonWidth + 5) buttonHeight
-globaloptions_savepath=(prev.x2 + 20) (vBorder + 3) (parent.w - (5 + buttonWidth + 20) - 10) kLineHeight
+globaloptions_savepath=(prev.x2 + 20) (vBorder + 3) (parent.w - (prev.w + 20) - 10) kLineHeight
 yoffset=(yoffset + buttonHeight + 4)
 globaloptions_extrabutton=5 yoffset (buttonWidth + 5) buttonHeight
-globaloptions_extrapath=(prev.x2 + 20) (vBorder + 3) (parent.w - (5 + buttonWidth + 20) - 10) kLineHeight
+globaloptions_extrapath=(prev.x2 + 20) (vBorder + 3) (parent.w - (prev.w + 20) - 10) kLineHeight
 yoffset=(yoffset + buttonHeight + 4)
 globaloptions_keysbutton=5 yoffset buttonWidth buttonHeight
 
-globaloptions_ok=(parent.w - (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
 globaloptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
+globaloptions_ok=(prev.x2 + 10) prev.y prev.w prev.h
 
-# game options
+### game options
 opYoffset=(vBorder + buttonHeight)
 opWidth=globOptionsW
 useWithPrefix=graphicsControls gameoptions_
@@ -228,20 +242,86 @@
 opYoffset=(vBorder + buttonHeight)
 useWithPrefix=midiControls gameoptions_
 
-### SCUMM game options
+##### SCUMM dialogs
+scummDummyDialog=0 80 0 16
+
+## Main dialog
+# note that scummmain size depends on overall height
+smY=(scummmainVSpace + scummmainVAddOff)
+scummmain_resume=scummmainHOffset smY scummmainButtonWidth scummmainButtonHeight
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)
+smY=(smY + scummmainVSpace)
+scummmain_load=prev.x smY prev.w prev.h
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)
+scummmain_save=prev.x smY prev.w prev.h
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)
+smY=(smY + scummmainVSpace)
+scummmain_options=prev.x smY prev.w prev.h
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)
+scummmain_help=prev.x smY prev.w prev.h
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)
+scummmain_about=prev.x smY prev.w prev.h
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)
+smY=(smY + scummmainVSpace)
+scummmain_quit=prev.x smY prev.w prev.h
+smY=(smY + scummmainButtonHeight + scummmainVAddOff)
+smW=(scummmainButtonWidth + 2 * scummmainHOffset)
+smH=(smY + scummmainVSpace)
+scummmain=((w - smW) / 2) ((h - smH) / 2) smW smH
+
+## Engine config
+# note that scummconfig size depends on overall height
+# hence it is on the end of the list
 opYoffset=8
-useWithPrefix=volumeControls scummoptions_
+useWithPrefix=volumeControls scummconfig_
+scummconfig_subtitlesCheckbox=15 opYoffset (kFontHeight + 10 + 89) buttonHeight
+opYoffset=(opYoffset + buttonHeight)
+scummconfig_speechCheckbox=prev.x opYoffset (kFontHeight + 10 + 85) buttonHeight
+opYoffset=(opYoffset + buttonHeight + 4)
+soWidth=(8 + 3 * buttonWidth + 4)
+scummconfig_keys=(soWidth - 3 * (buttonWidth + 4) - 4) opYoffset buttonWidth buttonHeight
+scummconfig_cancel=(prev.x2 + 4) prev.y prev.w prev.h
+scummconfig_ok=(prev.x2 + 4) prev.y prev.w prev.h
+opYoffset=(opYoffset + buttonHeight)
+scummconfig=((w - soWidth) / 2) ((h - opYoffset) / 2) soWidth (opYoffset + 8)
 
+## Help
+scummHelpNumLines=15
+shH=(5 + (2 + scummHelpNumLines) * kFontHeight + buttonHeight + 7)
+scummhelp=scummhelpX ((h - shH) / 2) scummhelpW shH
+scummhelp_title=10 5 scummhelpW kFontHeight
+scummhelp_key.x=10
+scummhelp_key.yoffset=5
+scummhelp_key.w=80
+scummhelp_key.h=kFontHeight
+scummhelp_dsc.x=90
+scummhelp_dsc.yoffset=5
+scummhelp_dsc.w=(scummhelpW - 10 - 90)
+scummhelp_dsc.h=kFontHeight
+scummhelp_prev=10 (5 + kFontHeight * (scummHelpNumLines + 2) + 2) buttonWidth buttonHeight
+scummhelp_next=(prev.x2 + 8) prev.y prev.w prev.h
+scummhelp_close=(scummhelpW - 8 - buttonWidth) prev.y prev.w prev.h
+
+# Saveload dialog
+scummsaveload=8 8 (w - 2 * 8) (h - 16)
+set_parent=scummsaveload
+scummsaveload_title=10 6 (parent.w - 2 * 10) kLineHeight
+scummsaveload_list=10 18 (parent.w - 2 * 10 - 180) (parent.h - 14 - buttonHeight - 18)
+scummsaveload_thumbnail=(parent.w - (kThumbnailWidth + 22)) 18
+scummsaveload_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
+scummsaveload_choose=(prev.x2 + 10) prev.y prev.w prev.h
+
+############################################
 [graphicsControls]
 gcx=10
 gcw=(opWidth - 2 * 10)
 grModePopup=(gcx - 5) opYoffset (gcw + 5) kLineHeight
 opYoffset=(opYoffset + kLineHeight + 4)
-grRenderPopup=(gcx - 5) opYoffset (gcw + 5) kLineHeight
+grRenderPopup=prev.x opYoffset prev.w prev.h
 opYoffset=(opYoffset + kLineHeight + 4)
 grFullscreenCheckbox=gcx opYoffset (kFontHeight + 10 + 96) buttonHeight
 opYoffset=(opYoffset + buttonHeight)
-grAspectCheckbox=gcx opYoffset (kFontHeight + 10 + 136) buttonHeight
+grAspectCheckbox=prev.x opYoffset (kFontHeight + 10 + 136) prev.h
 opYoffset=(opYoffset + buttonHeight)
 
 [audioControls]

Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/widget.cpp	2006-03-09 01:08:25 UTC (rev 21147)
@@ -123,8 +123,9 @@
 
 #pragma mark -
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, TextAlignment align, WidgetSize ws)
-	: Widget(boss, x, y, w, h), _align(align), _ws(ws) {
+StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, TextAlignment align)
+	: Widget(boss, x, y, w, h), _align(align) {
+	_ws = g_gui.getWidgetSize();
 	_flags = WIDGET_ENABLED;
 	_type = kStaticTextWidget;
 	_label = text;
@@ -169,7 +170,7 @@
 #pragma mark -
 
 ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const String &label, uint32 cmd, uint8 hotkey, WidgetSize ws)
-	: StaticTextWidget(boss, x, y, w, h, label, kTextAlignCenter, ws), CommandSender(boss),
+	: StaticTextWidget(boss, x, y, w, h, label, kTextAlignCenter), CommandSender(boss),
 	  _cmd(cmd), _hotkey(hotkey) {
 	_flags = WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG;
 	_type = kButtonWidget;

Modified: scummvm/trunk/gui/widget.h
===================================================================
--- scummvm/trunk/gui/widget.h	2006-03-08 21:21:56 UTC (rev 21146)
+++ scummvm/trunk/gui/widget.h	2006-03-09 01:08:25 UTC (rev 21147)
@@ -163,7 +163,7 @@
 	TextAlignment			_align;
 	WidgetSize				_ws;
 public:
-	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, TextAlignment align, WidgetSize ws = kDefaultWidgetSize);
+	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, TextAlignment align);
 	StaticTextWidget(GuiObject *boss, String name, const String &text, TextAlignment align);
 	void setValue(int value);
 	void setLabel(const String &label);


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