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

sev at users.sourceforge.net sev at users.sourceforge.net
Fri May 26 22:48:02 CEST 2006


Revision: 22670
Author:   sev
Date:     2006-05-26 22:46:04 -0700 (Fri, 26 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22670&view=rev

Log Message:
-----------
Major GUI update:
- Implemented padding in console
- Update only current line in console instead of whole screen
- Fixed caret positioning in edit text widget
- Improved buttons drawing, now they look more realistic
- Added label spacing in popup widget
- Correct shadow in popup widget
- Fixed up with selected popup widget being drawn on wrong tab
- Added shading to list dialog
- Adjusted shading of inactive widgets
- Proper coloring of browset (add game) dialog
- Introduced Container widget
- Used Container widget in scumm save/load dialog. Now it looks properly
- Adjusted button colors even more. Now they match almost perfectly albeit with banding
- Made scrollbar appear only when it is really needed

Modified Paths:
--------------
    scummvm/trunk/dists/msvc8/scummvm.vcproj
    scummvm/trunk/engines/scumm/dialogs.cpp
    scummvm/trunk/engines/scumm/dialogs.h
    scummvm/trunk/gui/EditTextWidget.cpp
    scummvm/trunk/gui/ListWidget.cpp
    scummvm/trunk/gui/ListWidget.h
    scummvm/trunk/gui/PopUpWidget.cpp
    scummvm/trunk/gui/PopUpWidget.h
    scummvm/trunk/gui/ScrollBarWidget.cpp
    scummvm/trunk/gui/ThemeClassic.cpp
    scummvm/trunk/gui/ThemeNew.cpp
    scummvm/trunk/gui/browser.cpp
    scummvm/trunk/gui/console.cpp
    scummvm/trunk/gui/console.h
    scummvm/trunk/gui/editable.cpp
    scummvm/trunk/gui/editable.h
    scummvm/trunk/gui/newgui.cpp
    scummvm/trunk/gui/newgui.h
    scummvm/trunk/gui/theme.h
    scummvm/trunk/gui/themes/modern.ini
    scummvm/trunk/gui/widget.cpp
    scummvm/trunk/gui/widget.h
Modified: scummvm/trunk/dists/msvc8/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/scummvm.vcproj	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/dists/msvc8/scummvm.vcproj	2006-05-27 05:46:04 UTC (rev 22670)
@@ -959,6 +959,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\graphics\cursorman.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\graphics\cursorman.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\graphics\font.cpp"
 				>
 			</File>

Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/engines/scumm/dialogs.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -244,57 +244,21 @@
 	_list->setEditable(saveMode);
 	_list->setNumberingMode(saveMode ? GUI::kListNumberingOne : GUI::kListNumberingZero);
 
-	if (g_gui.evaluator()->getVar("scummsaveload_extinfo.visible") == 1) {
-		int thumbX = g_gui.evaluator()->getVar("scummsaveload_thumbnail.x");
-		int thumbY = g_gui.evaluator()->getVar("scummsaveload_thumbnail.y");
+	_container = new GUI::ContainerWidget(this, 0, 0, 10, 10);
+	_container->setHints(GUI::THEME_HINT_USE_SHADOW);
 
-		// Add the thumbnail display
-		_gfxWidget = new GUI::GraphicsWidget(this,
-				thumbX, thumbY,
-				kThumbnailWidth + 8,
-				((_vm->_system->getHeight() % 200 && _vm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8);
-		_gfxWidget->setFlags(GUI::WIDGET_BORDER);
+	_gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10);
 	
-		int height = thumbY + ((_vm->_system->getHeight() % 200 && _vm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8;
-	
-		_date = new StaticTextWidget(this,
-						thumbX,
-						height,
-						kThumbnailWidth + 8,
-						kLineHeight,
-						"No date saved",
-						kTextAlignCenter);
-	
-		height += kLineHeight;
-	
-		_time = new StaticTextWidget(this,
-						thumbX,
-						height,
-						kThumbnailWidth + 8,
-						kLineHeight,
-						"No time saved",
-						kTextAlignCenter);
-	
-		height += kLineHeight;
-	
-		_playtime = new StaticTextWidget(this,
-						thumbX,
-						height,
-						kThumbnailWidth + 8,
-						kLineHeight,
-						"No playtime saved",
-						kTextAlignCenter);
-	} else {
-		_gfxWidget = 0;
-		_date = 0;
-		_time = 0;
-		_playtime = 0;
-	}
+	_date = new StaticTextWidget(this, 0, 0, 10, 10, "No date saved", kTextAlignCenter);
+	_time = new StaticTextWidget(this, 0, 0, 10, 10, "No time saved", kTextAlignCenter);
+	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, "No playtime saved", kTextAlignCenter);
 
 	// Buttons
 	new GUI::ButtonWidget(this, "scummsaveload_cancel", "Cancel", kCloseCmd, 0);
 	_chooseButton = new GUI::ButtonWidget(this, "scummsaveload_choose", buttonLabel, kChooseCmd, 0);
 	_chooseButton->setEnabled(false);
+
+	handleScreenChanged();
 }
 
 SaveLoadChooser::~SaveLoadChooser() {
@@ -358,62 +322,40 @@
 	if (g_gui.evaluator()->getVar("scummsaveload_extinfo.visible") == 1) {
 		int thumbX = g_gui.evaluator()->getVar("scummsaveload_thumbnail.x");
 		int thumbY = g_gui.evaluator()->getVar("scummsaveload_thumbnail.y");
+		int hPad = g_gui.evaluator()->getVar("scummsaveload_thumbnail.hPad");
+		int vPad = g_gui.evaluator()->getVar("scummsaveload_thumbnail.vPad");
+		int thumbH = ((_vm->_system->getHeight() % 200 && _vm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1);
+
+		_container->resize(thumbX - hPad, thumbY - vPad, kThumbnailWidth + hPad * 2, thumbH + vPad * 2 + kLineHeight * 4);
 	
 		// Add the thumbnail display
-		if (!_gfxWidget) {
-			_gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 0, 0);
-			_gfxWidget->setFlags(GUI::WIDGET_BORDER);
-		}
-		_gfxWidget->resize(thumbX, thumbY, kThumbnailWidth + 8,
-				((_vm->_system->getHeight() % 200 && _vm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8);
+		_gfxWidget->resize(thumbX, thumbY, kThumbnailWidth, thumbH);
 	
-		int height = thumbY + ((_vm->_system->getHeight() % 200 && _vm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8;
+		int height = thumbY + thumbH + kLineHeight;
 
-		if (!_date)
-			_date = new StaticTextWidget(this, 0, 0, 0, 0, "", kTextAlignCenter);
-		_date->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+		_date->resize(thumbX, height, kThumbnailWidth, kLineHeight);
 	
 		height += kLineHeight;
 
-		if (!_time)
-			_time = new StaticTextWidget(this, 0, 0, 0, 0, "", kTextAlignCenter);
-		_time->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+		_time->resize(thumbX, height, kThumbnailWidth, kLineHeight);
 	
 		height += kLineHeight;
 
-		if (!_playtime)
-			_playtime = new StaticTextWidget(this, 0, 0, 0, 0, "", kTextAlignCenter);
-		_playtime->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+		_playtime->resize(thumbX, height, kThumbnailWidth, kLineHeight);
 	
+		_container->clearFlags(GUI::WIDGET_INVISIBLE);
+		_gfxWidget->clearFlags(GUI::WIDGET_INVISIBLE);
+		_date->clearFlags(GUI::WIDGET_INVISIBLE);
+		_time->clearFlags(GUI::WIDGET_INVISIBLE);
+		_playtime->clearFlags(GUI::WIDGET_INVISIBLE);
+
 		updateInfos();
 	} else {
-		if (_gfxWidget) {
-			deleteWidget(_gfxWidget);
-			_gfxWidget->setNext(0);
-			delete _gfxWidget;
-			_gfxWidget = 0;
-		}
-
-		if (_date) {
-			deleteWidget(_date);
-			_date->setNext(0);
-			delete _date;
-			_date = 0;
-		}
-
-		if (_time) {
-			deleteWidget(_time);
-			_time->setNext(0);
-			delete _time;
-			_time = 0;
-		}
-
-		if (_playtime) {
-			deleteWidget(_playtime);
-			_playtime->setNext(0);
-			delete _playtime;
-			_playtime = 0;
-		}
+		_container->setFlags(GUI::WIDGET_INVISIBLE);
+		_gfxWidget->setFlags(GUI::WIDGET_INVISIBLE);
+		_date->setFlags(GUI::WIDGET_INVISIBLE);
+		_time->setFlags(GUI::WIDGET_INVISIBLE);
+		_playtime->setFlags(GUI::WIDGET_INVISIBLE);
 	}
 
 	Dialog::handleScreenChanged();

Modified: scummvm/trunk/engines/scumm/dialogs.h
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/engines/scumm/dialogs.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -61,6 +61,7 @@
 	GUI::StaticTextWidget	*_date;
 	GUI::StaticTextWidget	*_time;
 	GUI::StaticTextWidget	*_playtime;
+	GUI::ContainerWidget	*_container;
 	ScummEngine			*_vm;
 
 	void updateInfos();

Modified: scummvm/trunk/gui/EditTextWidget.cpp
===================================================================
--- scummvm/trunk/gui/EditTextWidget.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/EditTextWidget.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -55,6 +55,8 @@
 	EditableWidget::handleScreenChanged();
 	_leftPadding = g_gui.evaluator()->getVar("EditTextWidget.leftPadding", 0);
 	_rightPadding = g_gui.evaluator()->getVar("EditTextWidget.rightPadding", 0);
+
+	_font = (Theme::kFontStyle)g_gui.evaluator()->getVar("EditTextWidget.font", Theme::kFontStyleNormal);
 }
 
 
@@ -83,11 +85,11 @@
 
 	// Draw the text
 	adjustOffset();
-	g_gui.theme()->drawText(Common::Rect(_x+2 + _leftPadding,_y+2, _x+getEditRect().width()-2, _y+_h-2), _editString, Theme::kStateEnabled, Theme::kTextAlignLeft, false, -_editScrollOffset, false, Theme::kFontStyleNormal);
+	g_gui.theme()->drawText(Common::Rect(_x+2+ _leftPadding,_y+2, _x+_leftPadding+getEditRect().width()+2, _y+_h-2), _editString, Theme::kStateEnabled, Theme::kTextAlignLeft, false, -_editScrollOffset, false, _font);
 }
 
 Common::Rect EditTextWidget::getEditRect() const {
-	Common::Rect r(2 + _leftPadding, 1, _w - 2 - _leftPadding, _h);
+	Common::Rect r(2 + _leftPadding, 1, _w - 2 - _leftPadding - _rightPadding, _h);
 
 	return r;
 }

Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/ListWidget.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -41,18 +41,17 @@
 	_hlLeftPadding = g_gui.evaluator()->getVar("ListWidget.hlLeftPadding", 0);
 	_hlRightPadding = g_gui.evaluator()->getVar("ListWidget.hlRightPadding", 0);
 
-	int scrollBarWidth;
 	if (ws == kBigWidgetSize) {
-		scrollBarWidth =  kBigScrollBarWidth;
+		_scrollBarWidth =  kBigScrollBarWidth;
 	} else {
-		scrollBarWidth = kNormalScrollBarWidth;
+		_scrollBarWidth = kNormalScrollBarWidth;
 	}
 	
-	_scrollBar = new ScrollBarWidget(this, _w - scrollBarWidth, 0, scrollBarWidth, _h);
+	_scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth, 0, _scrollBarWidth, _h);
 	_scrollBar->setTarget(this);
 
 	_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE;
-	setHints(THEME_HINT_SAVE_BACKGROUND);
+	setHints(THEME_HINT_SAVE_BACKGROUND | THEME_HINT_USE_SHADOW);
 	_type = kListWidget;
 	_editMode = false;
 	_numberingMode = kListNumberingOne;
@@ -139,6 +138,11 @@
 	if (!isEnabled())
 		return;
 
+	if (x >= _w - _scrollBarWidth) {
+		_scrollBar->handleMouseDown(x, y, button, clickCount);
+		return;
+	}
+
 	// First check whether the selection changed
 	int newSelectedItem;
 	newSelectedItem = findItem(x, y);
@@ -345,7 +349,7 @@
 			char temp[10];
 			sprintf(temp, "%2d. ", (pos + _numberingMode));
 			buffer = temp;
-			g_gui.theme()->drawText(Common::Rect(_x, y, _x + r.left + _leftPadding, y + fontHeight - 1), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted, _leftPadding);
+			g_gui.theme()->drawText(Common::Rect(_x, y, _x + r.left + _leftPadding, y + fontHeight - 2), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted, _leftPadding);
 			pad = 0;
 		}
 
@@ -354,8 +358,8 @@
 		if (_selectedItem == pos && _editMode) {
 			buffer = _editString;
 			adjustOffset();
-			width = _w - r.left - _hlRightPadding - _leftPadding - _rightPadding;
-			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 1), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted, pad);
+			width = _w - r.left - _hlRightPadding - _leftPadding;
+			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight-2), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted, pad);
 		} else {
 			int maxWidth = _textWidth[i];
 			buffer = _list[pos];
@@ -367,7 +371,7 @@
 				width = _w - r.left - _hlRightPadding;
 			if (width > maxWidth)
 				maxWidth = width;
-			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + maxWidth, y + fontHeight - 1), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted, pad);
+			g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + maxWidth, y + fontHeight-2), buffer, Theme::kStateEnabled, Theme::kTextAlignLeft, inverted, pad);
 		}
 
 		_textWidth[i] = width;
@@ -449,11 +453,10 @@
 	_hlLeftPadding = g_gui.evaluator()->getVar("ListWidget.hlLeftPadding", 0);
 	_hlRightPadding = g_gui.evaluator()->getVar("ListWidget.hlRightPadding", 0);
 
-	int scrollBarWidth;
 	if (ws == kBigWidgetSize) {
-		scrollBarWidth =  kBigScrollBarWidth;
+		_scrollBarWidth =  kBigScrollBarWidth;
 	} else {
-		scrollBarWidth = kNormalScrollBarWidth;
+		_scrollBarWidth = kNormalScrollBarWidth;
 	}
 
 	_entriesPerPage = (_h - _topPadding - _bottomPadding) / kLineHeight;
@@ -464,7 +467,7 @@
 	for (int i = 0; i < _entriesPerPage; i++)
 		_textWidth[i] = 0;
 
-	_scrollBar->resize(_w - scrollBarWidth, 0, scrollBarWidth, _h);
+	_scrollBar->resize(_w - _scrollBarWidth, 0, _scrollBarWidth, _h);
 	scrollBarRecalc();
 }
 

Modified: scummvm/trunk/gui/ListWidget.h
===================================================================
--- scummvm/trunk/gui/ListWidget.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/ListWidget.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -67,6 +67,7 @@
 	int				_rightPadding;
 	int				_topPadding;
 	int				_bottomPadding;
+	int				_scrollBarWidth;
 
 public:
 	ListWidget(GuiObject *boss, String name);

Modified: scummvm/trunk/gui/PopUpWidget.cpp
===================================================================
--- scummvm/trunk/gui/PopUpWidget.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/PopUpWidget.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -75,10 +75,10 @@
 	_selection = _popUpBoss->_selectedItem;
 
 	// Calculate real popup dimensions
-	_x = _popUpBoss->getAbsX() + _popUpBoss->_labelWidth;
+	_x = _popUpBoss->getAbsX() + _popUpBoss->_labelWidth + _popUpBoss->_labelSpacing;
 	_y = _popUpBoss->getAbsY() - _popUpBoss->_selectedItem * kLineHeight;
 	_h = _popUpBoss->_entries.size() * kLineHeight + 2;
-	_w = _popUpBoss->_w - kLineHeight + 2 - _popUpBoss->_labelWidth;
+	_w = _popUpBoss->_w - kLineHeight + 2 - _popUpBoss->_labelWidth - _popUpBoss->_labelSpacing;
 
 	_leftPadding = _popUpBoss->_leftPadding;
 	_rightPadding = _popUpBoss->_rightPadding;
@@ -365,6 +365,7 @@
 			_selectedItem = newSel;
 			sendCommand(kPopUpItemSelectedCmd, _entries[_selectedItem].tag);
 		}
+		g_gui.clearDragWidget();
 	}
 }
 
@@ -373,6 +374,7 @@
 
 	_leftPadding = g_gui.evaluator()->getVar("PopUpWidget.leftPadding", 0);
 	_rightPadding = g_gui.evaluator()->getVar("PopUpWidget.rightPadding", 0);
+	_labelSpacing = g_gui.evaluator()->getVar("PopUpWidget.labelSpacing", 0);
 
 	Widget::handleScreenChanged();
 }
@@ -411,8 +413,8 @@
 }
 
 void PopUpWidget::drawWidget(bool hilite) {
-	int x = _x + _labelWidth;
-	int w = _w - _labelWidth;
+	int x = _x + _labelWidth + _labelSpacing;
+	int w = _w - _labelWidth - _labelSpacing;
 
 	// Draw the label, if any
 	if (_labelWidth > 0)

Modified: scummvm/trunk/gui/PopUpWidget.h
===================================================================
--- scummvm/trunk/gui/PopUpWidget.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/PopUpWidget.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -58,6 +58,7 @@
 
 	int				_leftPadding;
 	int				_rightPadding;
+	int				_labelSpacing;
 
 public:
 	PopUpWidget(GuiObject *boss, String name, const String &label, uint labelWidth = 0);

Modified: scummvm/trunk/gui/ScrollBarWidget.cpp
===================================================================
--- scummvm/trunk/gui/ScrollBarWidget.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/ScrollBarWidget.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -173,9 +173,11 @@
 			UP_DOWN_BOX_HEIGHT + (_h - 2 * UP_DOWN_BOX_HEIGHT - _sliderHeight) * _currentPos / (_numEntries - _entriesPerPage);
 		if (_sliderPos < 0)
 			_sliderPos = 0;
+		clearFlags(WIDGET_INVISIBLE);
 	} else {
 		_sliderHeight = _h - 2 * UP_DOWN_BOX_HEIGHT;
 		_sliderPos = UP_DOWN_BOX_HEIGHT;
+		setFlags(WIDGET_INVISIBLE);
 	}
 }
 

Modified: scummvm/trunk/gui/ThemeClassic.cpp
===================================================================
--- scummvm/trunk/gui/ThemeClassic.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/ThemeClassic.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -451,7 +451,7 @@
 
 // intern drawing
 
-void ThemeClassic::restoreBackground(Common::Rect r) {
+void ThemeClassic::restoreBackground(Common::Rect r, bool special) {
 	r.clip(_screen.w, _screen.h);
 	r.clip(_drawArea);
 #ifndef OLDGUI_TRANSPARENCY
@@ -478,7 +478,7 @@
 #endif
 }
 
-bool ThemeClassic::addDirtyRect(Common::Rect r, bool save) {
+bool ThemeClassic::addDirtyRect(Common::Rect r, bool save, bool special) {
 	// TODO: implement proper dirty rect handling
 	// FIXME: problem with the 'pitch'
 	r.clip(_screen.w, _screen.h);

Modified: scummvm/trunk/gui/ThemeNew.cpp
===================================================================
--- scummvm/trunk/gui/ThemeNew.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/ThemeNew.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -35,13 +35,15 @@
 
 #include "common/unzip.h"
 
+#define kShadowTr0 8
 #define kShadowTr1 16
 #define kShadowTr2 32
 #define kShadowTr3 64
+#define kShadowTr35 96
 #define kShadowTr4 128
 #define kShadowTr5 192
 
-#define THEME_VERSION 12
+#define THEME_VERSION 13
 
 using Graphics::Surface;
 
@@ -471,6 +473,11 @@
 
 		drawRectMasked(r, surface(kDialogBkgdCorner), surface(kDialogBkgdTop), surface(kDialogBkgdLeft), surface(kDialogBkgd),
 			256, _colors[kMainDialogStart], _colors[kMainDialogEnd], _gradientFactors[kDialogSpecialFactor]);
+	} else if (hints & THEME_HINT_PLAIN_COLOR) {
+		drawShadow(r, surface(kDialogBkgdCorner), surface(kDialogBkgdTop), surface(kDialogBkgdLeft), surface(kDialogBkgd), kShadowFull);
+
+		drawRectMasked(r, surface(kDialogBkgdCorner), surface(kDialogBkgdTop), surface(kDialogBkgdLeft), surface(kDialogBkgd),
+			256, _colors[kDialogEnd], _colors[kDialogEnd], _gradientFactors[kDialogFactor]);
 	} else {
 		drawShadow(r, surface(kDialogBkgdCorner), surface(kDialogBkgdTop), surface(kDialogBkgdLeft), surface(kDialogBkgd), kShadowFull);
 
@@ -547,7 +554,10 @@
 		left = kWidgetBkgdLeft;
 		bkgd = kWidgetBkgd;
 		shadow = kShadowFull;
-		start = kWidgetBackgroundStart;
+		if (hints & THEME_HINT_PLAIN_COLOR)
+			start = kWidgetBackgroundEnd;
+		else
+			start = kWidgetBackgroundStart;
 		end = kWidgetBackgroundEnd;
 		factor = kWidgetFactor;
 		break;
@@ -661,12 +671,13 @@
 	Common::Rect r2 = r;
 	r2.left = r.left;
 	r2.top = r.top;
-	r2.bottom = r.bottom;
-	r2.right = r2.left + width;
+	r2.bottom = r.bottom-1;
+	r2.right = r2.left + width-1;
 	if (r2.right > r.right) {
 		r2.right = r.right;
 	}
 	
+	drawShadow(r2, surface(kButtonBkgdCorner), surface(kButtonBkgdTop), surface(kButtonBkgdLeft), surface(kButtonBkgd), kShadowButton);
 	if (state == kStateHighlight) {
 		drawRectMasked(r2, surface(kSliderCorner), surface(kSliderTop), surface(kSliderLeft), surface(kSliderBkgd),
 					256, _colors[kSliderHighStart], _colors[kSliderHighEnd], _gradientFactors[kSliderFactor]);
@@ -691,7 +702,7 @@
 		end = _colors[kPopUpWidgetHighlightEnd];
 	}
 
-	drawShadow(r, surface(kDialogBkgdCorner), surface(kDialogBkgdTop), surface(kDialogBkgdLeft), surface(kDialogBkgd), kShadowSmall);
+	drawShadow(r, surface(kDialogBkgdCorner), surface(kDialogBkgdTop), surface(kDialogBkgdLeft), surface(kDialogBkgd), kShadowPopUp);
 
 	drawRectMasked(r, surface(kPopUpWidgetBkgdCorner), surface(kPopUpWidgetBkgdTop), surface(kPopUpWidgetBkgdLeft), surface(kPopUpWidgetBkgd),
 						(state == kStateDisabled) ? -30 : 256, start, end, _gradientFactors[kPopUpWidgetFactor]);
@@ -1034,13 +1045,21 @@
 Common::Rect ThemeNew::shadowRect(const Common::Rect &r, uint32 shadowStyle) {
 	switch (shadowStyle) {
 	case kShadowButton:
-		return Common::Rect(r.left - _shadowLeftWidth/2, r.top - _shadowTopHeight/2, r.right + _shadowRightWidth/2 - 1, r.bottom + _shadowBottomHeight/2 - 1);
+		return Common::Rect(r.left - 1, r.top - 1, r.right + 1, r.bottom + 1);
 		break;
 
 	case kShadowEmboss:
 		return Common::Rect(r.left - 1, r.top - 1, r.right + 1, r.bottom + 1);
 		break;
 
+	case kShadowPopUp:
+		return Common::Rect(r.left - 1, r.top - 1, r.right + 3, r.bottom + 3);
+		break;
+
+	case kShadowFull:
+		return Common::Rect(r.left - 2, r.top - 2, r.right + 4, r.bottom + 4);
+		break;
+
 	default:
 		return Common::Rect(r.left - _shadowLeftWidth/2, r.top - _shadowTopHeight/2, r.right + _shadowRightWidth/2 + 1, r.bottom + _shadowBottomHeight/2 + 1);
 		break;
@@ -1053,13 +1072,16 @@
 						const Graphics::Surface *left, const Graphics::Surface *fill, uint32 shadowStyle, bool skipLastRow) {
 	switch (shadowStyle) {
 	case kShadowFull: {
-		Common::Rect r2(r.left - _shadowLeftWidth/2, r.top - _shadowTopHeight/2, r.right + _shadowRightWidth/2 + 1, r.bottom + _shadowBottomHeight/2 + 1);
-		Common::Rect r3(r.left - _shadowLeftWidth/2, r.top - _shadowTopHeight/2, r.right + _shadowRightWidth/2, r.bottom + _shadowBottomHeight/2);
-		Common::Rect r4(r.left - _shadowLeftWidth/2 + 1, r.top - _shadowTopHeight/2 + 1, r.right + _shadowRightWidth/2-1, r.bottom + _shadowBottomHeight/2-1);
+		Common::Rect r2(r.left-1, r.top-1, r.right + 4, r.bottom + 4);
+		Common::Rect r3(r.left, r.top+1, r.right + 3, r.bottom + 3);
+		Common::Rect r4(r.left, r.top+1, r.right + 2, r.bottom + 2);
+		Common::Rect r5(r.left, r.top, r.right + 1, r.bottom + 1);
 
-		drawShadowRect(r2, r, corner, top, left, fill, kShadowTr1, skipLastRow);
-		drawShadowRect(r3, r, corner, top, left, fill, kShadowTr2, skipLastRow);
-		drawShadowRect(r4, r, corner, top, left, fill, kShadowTr3, skipLastRow);
+		drawShadowRect(r2, r, corner, top, left, fill, kShadowTr0, skipLastRow);
+		drawShadowRect(r3, r, corner, top, left, fill, kShadowTr1, skipLastRow);
+		drawShadowRect(r4, r, corner, top, left, fill, kShadowTr2, skipLastRow);
+		drawShadowRect(r5, r, corner, top, left, fill, kShadowTr3, skipLastRow);
+		//drawShadowRect(r5, r, corner, top, left, fill, kShadowTr35, skipLastRow);
 		} break;
 
 	case kShadowSmall: {
@@ -1071,11 +1093,11 @@
 		} break;
 
 	case kShadowButton: {
-		Common::Rect r2(r.left - _shadowLeftWidth/2, r.top - _shadowTopHeight/2, r.right + _shadowRightWidth/2 - 1, r.bottom + _shadowBottomHeight/2 - 1);
-		Common::Rect r3(r.left - _shadowLeftWidth/2 + 1, r.top - _shadowTopHeight/2 + 1, r.right + _shadowRightWidth/2 - 1, r.bottom + _shadowBottomHeight/2 - 1);
+		Common::Rect r2(r.left-1, r.top - 1, r.right, r.bottom);
+		Common::Rect r4(r.left, r.top, r.right + 1, r.bottom + 1);
 
-		drawShadowRect(r2, r, corner, top, left, fill, kShadowTr2, skipLastRow);
-		drawShadowRect(r3, r, corner, top, left, fill, kShadowTr4, skipLastRow);
+		drawShadowRect(r2, r, corner, top, left, fill, -kShadowTr35-256, skipLastRow);
+		drawShadowRect(r4, r, corner, top, left, fill, kShadowTr4, skipLastRow);
 		} break;
 
 	case kShadowEmboss: {
@@ -1084,8 +1106,20 @@
 
 		drawShadowRect(r2, r, corner, top, left, fill, kShadowTr5, skipLastRow);
 		drawShadowRect(r4, r, corner, top, left, fill, kShadowTr1, skipLastRow);
-		};
+		} break;
 
+	case kShadowPopUp: {
+		Common::Rect r2(r.left, r.top, r.right + 3, r.bottom + 3);
+		Common::Rect r25(r.left-1, r.top-1, r.right + 2, r.bottom + 2);
+		Common::Rect r3(r.left - 1, r.top-1, r.right, r.bottom);
+		Common::Rect r4(r.left, r.top, r.right + 1, r.bottom + 1);
+
+		drawShadowRect(r2, r, corner, top, left, fill, kShadowTr1, skipLastRow);
+		drawShadowRect(r25, r, corner, top, left, fill, kShadowTr2, skipLastRow);
+		drawShadowRect(r4, r, corner, top, left, fill, kShadowTr3, skipLastRow);
+		drawShadowRect(r3, r, corner, top, left, fill, -kShadowTr35-256, skipLastRow);
+		} break;
+
 	default:
 		break;
 	}
@@ -1228,7 +1262,7 @@
 		} else {
 			blitSurface(NORMAL_OFFSET, NO_EFFECT);
 		}
-	} else if (alpha < 0) {
+	} else if (alpha < 0 && alpha >= -256) {
 		int backUp = _dimPercentValue;
 		_dimPercentValue = 256 * (100 - (-alpha)) / 100;
 
@@ -1595,11 +1629,28 @@
 	return output;
 }
 
+template<class T>
+inline OverlayColor getColorAlphaImp2(OverlayColor col1, OverlayColor col2, int alpha) {
+	OverlayColor output = 0;
+	output |= ((alpha * ((~col1 & T::kRedMask) - (col2 & T::kRedMask)) >> 8) + (col2 & T::kRedMask)) & T::kRedMask;
+	output |= ((alpha * ((~col1 & T::kGreenMask) - (col2 & T::kGreenMask)) >> 8) + (col2 & T::kGreenMask)) & T::kGreenMask;
+	output |= ((alpha * ((~col1 & T::kBlueMask) - (col2 & T::kBlueMask)) >> 8) + (col2 & T::kBlueMask)) & T::kBlueMask;
+	return output;
+}
+
 OverlayColor getColorAlpha(OverlayColor col1, OverlayColor col2, int alpha) {
-	if (gBitFormat == 565) {
-		return getColorAlphaImpl<ColorMasks<565> >(col1, col2, alpha);
+	if (alpha > 0) {
+		if (gBitFormat == 565) {
+			return getColorAlphaImpl<ColorMasks<565> >(col1, col2, alpha);
+		} else {
+			return getColorAlphaImpl<ColorMasks<555> >(col1, col2, alpha);
+		}
 	} else {
-		return getColorAlphaImpl<ColorMasks<555> >(col1, col2, alpha);
+		if (gBitFormat == 565) {
+			return getColorAlphaImp2<ColorMasks<565> >(col1, col2, -alpha - 256);
+		} else {
+			return getColorAlphaImp2<ColorMasks<555> >(col1, col2, -alpha - 256);
+		}
 	}
 }
 

Modified: scummvm/trunk/gui/browser.cpp
===================================================================
--- scummvm/trunk/gui/browser.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/browser.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -150,6 +150,8 @@
 	_fileList->setNumberingMode(kListNumberingOff);
 	_fileList->setEditable(false);
 
+	_fileList->setHints(THEME_HINT_PLAIN_COLOR);
+
 	// Buttons
 	new ButtonWidget(this, "browser_up", "Go up", kGoUpCmd, 0);
 	new ButtonWidget(this, "browser_cancel", "Cancel", kCloseCmd, 0);

Modified: scummvm/trunk/gui/console.cpp
===================================================================
--- scummvm/trunk/gui/console.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/console.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -101,6 +101,11 @@
 	else
 		_font = g_gui.theme()->getFont((Theme::kFontStyle)f);
 
+	_leftPadding = g_gui.evaluator()->getVar("Console.leftPadding", 0);
+	_rightPadding = g_gui.evaluator()->getVar("Console.rightPadding", 0);
+	_topPadding = g_gui.evaluator()->getVar("Console.topPadding", 0);
+	_bottomPadding = g_gui.evaluator()->getVar("Console.bottomPadding", 0);
+
 	// Calculate the real width/height (rounded to char/line multiples)
 	_w = (uint16)(_widthPercent * screenW);
 	_h = (uint16)((_heightPercent * screenH - 2) / kConsoleLineHeight);
@@ -116,8 +121,8 @@
 
 	_drawingHints = THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND;
 
-	_pageWidth = (_w - scrollBarWidth - 2) / kConsoleCharWidth;
-	_linesPerPage = (_h - 2) / kConsoleLineHeight;
+	_pageWidth = (_w - scrollBarWidth - 2 - _leftPadding - _topPadding - scrollBarWidth) / kConsoleCharWidth;
+	_linesPerPage = (_h - 2 - _topPadding - _bottomPadding) / kConsoleLineHeight;
 	_linesInBuffer = kBufferSize / kLineWidth;
 }
 
@@ -164,33 +169,42 @@
 }
 
 void ConsoleDialog::drawDialog() {
-	// Draw text
-	int start = _scrollLine - _linesPerPage + 1;
-	int y = _y + 2;
-	int limit = MIN(_pageWidth, (int)kLineWidth);
-
 	g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h), _drawingHints);
 	// FIXME: for the old theme the frame around the console vanishes
 	// when any action is processed if we enable this
 	// _drawingHints &= ~THEME_HINT_FIRST_DRAW;
 
-	for (int line = 0; line < _linesPerPage; line++) {
-		int x = _x + 1;
-		for (int column = 0; column < limit; column++) {
+	for (int line = 0; line < _linesPerPage; line++)
+		drawLine(line, false);
+
+	// Draw the scrollbar
+	_scrollBar->draw();
+}
+
+void ConsoleDialog::drawLine(int line, bool restoreBg) {
+	int x = _x + 1 + _leftPadding;
+	int start = _scrollLine - _linesPerPage + 1;
+	int y = _y + 2 + _topPadding;
+	int limit = MIN(_pageWidth, (int)kLineWidth);
+
+	y += line * kConsoleLineHeight;
+
+	if (restoreBg) {
+		Common::Rect r(_x, y - 2, _x + _pageWidth * kConsoleCharWidth, y+kConsoleLineHeight);
+		g_gui.theme()->restoreBackground(r);
+		g_gui.theme()->addDirtyRect(r);
+	}
+
+	for (int column = 0; column < limit; column++) {
 #if 0
-			int l = (start + line) % _linesInBuffer;
-			byte c = buffer(l * kLineWidth + column);
+		int l = (start + line) % _linesInBuffer;
+		byte c = buffer(l * kLineWidth + column);
 #else
-			byte c = buffer((start + line) * kLineWidth + column);
+		byte c = buffer((start + line) * kLineWidth + column);
 #endif
-			g_gui.theme()->drawChar(Common::Rect(x, y, x+kConsoleCharWidth, y+kConsoleLineHeight), c, _font);
-			x += kConsoleCharWidth;
-		}
-		y += kConsoleLineHeight;
+		g_gui.theme()->drawChar(Common::Rect(x, y, x+kConsoleCharWidth, y+kConsoleLineHeight), c, _font);
+		x += kConsoleCharWidth;
 	}
-
-	// Draw the scrollbar
-	_scrollBar->draw();
 }
 
 void ConsoleDialog::handleScreenChanged() {
@@ -301,7 +315,7 @@
 			killChar();
 		}
 		scrollToCurrent();
-		draw();	// FIXME - not nice to redraw the full console just for one char!
+		drawLine(pos2line(_currentPos));
 		break;
 	case 9: // tab
 	{
@@ -321,7 +335,7 @@
 					drawCaret(true);
 				insertIntoPrompt(completion);
 				scrollToCurrent();
-				draw();
+				drawLine(pos2line(_currentPos));
 				delete[] completion;
 			}
 			delete[] str;
@@ -330,7 +344,7 @@
 	}
 	case 127:
 		killChar();
-		draw();
+		drawLine(pos2line(_currentPos));
 		break;
 	case 256 + 24:	// pageup
 		if (modifiers == OSystem::KBD_SHIFT) {
@@ -382,12 +396,12 @@
 	case 275:	// cursor right
 		if (_currentPos < _promptEndPos)
 			_currentPos++;
-		draw();
+		drawLine(pos2line(_currentPos));
 		break;
 	case 276:	// cursor left
 		if (_currentPos > _promptStartPos)
 			_currentPos--;
-		draw();
+		drawLine(pos2line(_currentPos));
 		break;
 	default:
 		if (ascii == '~' || ascii == '#') {
@@ -599,7 +613,7 @@
 		drawCaret(true);
 
 	putcharIntern(c);
-	draw();	// FIXME - not nice to redraw the full console just for one char!
+	drawLine(pos2line(_currentPos));
 }
 
 void ConsoleDialog::putcharIntern(int c) {
@@ -636,11 +650,11 @@
 		return;
 	}
 
-	int x = _x + 1 + (_currentPos % kLineWidth) * kConsoleCharWidth;
-	int y = _y + displayLine * kConsoleLineHeight;
+	int x = _x + 1 + _leftPadding + (_currentPos % kLineWidth) * kConsoleCharWidth;
+	int y = _y + _topPadding + displayLine * kConsoleLineHeight;
 
 	_caretVisible = !erase;
-	g_gui.theme()->drawCaret(Common::Rect(x, y, x+kConsoleCharWidth, y+kConsoleLineHeight), erase);
+	g_gui.theme()->drawCaret(Common::Rect(x, y, x+1, y+kConsoleLineHeight), erase);
 }
 
 void ConsoleDialog::scrollToCurrent() {

Modified: scummvm/trunk/gui/console.h
===================================================================
--- scummvm/trunk/gui/console.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/console.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -90,6 +90,11 @@
 
 	float _widthPercent, _heightPercent;
 
+	int	_leftPadding;
+	int	_rightPadding;
+	int	_topPadding;
+	int	_bottomPadding;
+
 	void slideUpAndClose();
 
 public:
@@ -126,6 +131,9 @@
 
 	void init();
 
+	int pos2line(int pos) { return (pos - (_scrollLine - _linesPerPage + 1) * kLineWidth) / kLineWidth; }
+
+	void drawLine(int line, bool restoreBg = true);
 	void drawCaret(bool erase);
 	void putcharIntern(int c);
 	void insertIntoPrompt(const char *str);

Modified: scummvm/trunk/gui/editable.cpp
===================================================================
--- scummvm/trunk/gui/editable.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/editable.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -43,6 +43,8 @@
 	_caretInverse = false;
 
 	_editScrollOffset = 0;
+
+	_font = Theme::kFontStyleBold;
 }
 
 EditableWidget::~EditableWidget() {
@@ -54,7 +56,7 @@
 	_editString = str;
 	_caretPos = _editString.size();
 
-	_editScrollOffset = (g_gui.getStringWidth(_editString) - (getEditRect().width()));
+	_editScrollOffset = (g_gui.getStringWidth(_editString) - (getEditRect().width()), _font);
 	if (_editScrollOffset < 0)
 		_editScrollOffset = 0;
 }
@@ -109,11 +111,13 @@
 		if (_caretPos > 0) {
 			dirty = setCaretPos(_caretPos - 1);
 		}
+		dirty = true;
 		break;
 	case 256 + 19:	// right arrow
 		if (_caretPos < (int)_editString.size()) {
 			dirty = setCaretPos(_caretPos + 1);
 		}
+		dirty = true;
 		break;
 	case 256 + 22:	// home
 		dirty = setCaretPos(0);
@@ -139,7 +143,7 @@
 int EditableWidget::getCaretOffset() const {
 	int caretpos = 0;
 	for (int i = 0; i < _caretPos; i++)
-		caretpos += g_gui.getCharWidth(_editString[i]);
+		caretpos += g_gui.getCharWidth(_editString[i], _font);
 
 	caretpos -= _editScrollOffset;
 
@@ -191,7 +195,7 @@
 		_editScrollOffset -= (editWidth - caretpos);
 		return true;
 	} else if (_editScrollOffset > 0) {
-		const int strWidth = g_gui.getStringWidth(_editString);
+		const int strWidth = g_gui.getStringWidth(_editString, _font);
 		if (strWidth - _editScrollOffset < editWidth) {
 			// scroll right
 			_editScrollOffset = (strWidth - editWidth);

Modified: scummvm/trunk/gui/editable.h
===================================================================
--- scummvm/trunk/gui/editable.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/editable.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -25,6 +25,7 @@
 #include "common/str.h"
 #include "common/rect.h"
 #include "gui/widget.h"
+#include "gui/newgui.h"
 
 namespace GUI {
 
@@ -46,6 +47,8 @@
 
 	int			_editScrollOffset;
 
+	Theme::kFontStyle  _font;
+
 public:
 	EditableWidget(GuiObject *boss, int x, int y, int w, int h, WidgetSize ws = kNormalWidgetSize);
 	EditableWidget(GuiObject *boss, String name);
@@ -70,6 +73,8 @@
 	bool setCaretPos(int newPos);
 	bool adjustOffset();
 
+	void setFontStyle(Theme::kFontStyle font) { _font = font; }
+
 	virtual bool tryInsertChar(char c, int pos);
 };
 

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/newgui.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -349,4 +349,8 @@
 	_theme->refresh();
 }
 
+void NewGui::clearDragWidget() {
+	_dialogStack.top()->_dragWidget = 0;
+}
+
 } // End of namespace GUI

Modified: scummvm/trunk/gui/newgui.h
===================================================================
--- scummvm/trunk/gui/newgui.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/newgui.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -81,6 +81,9 @@
 	WidgetSize getWidgetSize();
 
 	void handleScreenChange();
+
+	void clearDragWidget();
+
 protected:
 	OSystem			*_system;
 

Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/theme.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -55,8 +55,11 @@
 	// Indicates special colorfade
 	THEME_HINT_SPECIAL_COLOR = 1 << 3,
 	
+	// Indicates no colorfade
+	THEME_HINT_PLAIN_COLOR = 1 << 4,
+	
 	// Indictaes that a shadows should be drawn around the background
-	THEME_HINT_USE_SHADOW = 1 << 4
+	THEME_HINT_USE_SHADOW = 1 << 5
 };
 
 
@@ -148,6 +151,9 @@
 	virtual void drawCaret(const Common::Rect &r, bool erase, kState state = kStateEnabled) = 0;
 	virtual void drawLineSeparator(const Common::Rect &r, kState state = kStateEnabled) = 0;
 
+	virtual void restoreBackground(Common::Rect r, bool special = false) = 0;
+	virtual bool addDirtyRect(Common::Rect r, bool save = false, bool special = false) = 0;
+
 	Graphics::TextAlignment convertAligment(kTextAlign align) const {
 		switch (align) {
 		case kTextAlignLeft:
@@ -245,10 +251,10 @@
 	void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, kState state, kTextAlign align);
 	void drawCaret(const Common::Rect &r, bool erase, kState state);
 	void drawLineSeparator(const Common::Rect &r, kState state);
+	void restoreBackground(Common::Rect r, bool special = false);
+	bool addDirtyRect(Common::Rect r, bool save = false, bool special = false);
+
 private:
-	void restoreBackground(Common::Rect r);
-	bool addDirtyRect(Common::Rect r, bool save = false);
-
 	void box(int x, int y, int width, int height, OverlayColor colorA, OverlayColor colorB, bool skipLastRow = false);
 	void box(int x, int y, int width, int height);
 
@@ -324,9 +330,10 @@
 	void drawLineSeparator(const Common::Rect &r, kState state);
 	const Graphics::Surface *getImageSurface(int n) { return _images[n]; }
 
-private:
+	void restoreBackground(Common::Rect r, bool special = false);
 	bool addDirtyRect(Common::Rect r, bool backup = false, bool special = false);
 
+private:
 	void colorFade(const Common::Rect &r, OverlayColor start, OverlayColor end, uint factor = 1);
 	void drawRect(const Common::Rect &r, const Graphics::Surface *corner, const Graphics::Surface *top,
 				const Graphics::Surface *left, const Graphics::Surface *fill, int alpha, bool skipLastRow = false);
@@ -341,7 +348,8 @@
 		kShadowFull = 0,
 		kShadowSmall = 1,
 		kShadowButton = 2,
-		kShadowEmboss = 3
+		kShadowEmboss = 3,
+		kShadowPopUp = 4
 	};
 
 	Common::Rect shadowRect(const Common::Rect &r, uint32 shadowStyle);
@@ -368,7 +376,6 @@
 	void resetupGuiRenderer();
 	void setupColors();
 
-	void restoreBackground(Common::Rect r, bool special = false);
 	OverlayColor getColor(kState state);
 
 	struct DialogState {

Modified: scummvm/trunk/gui/themes/modern.ini
===================================================================
--- scummvm/trunk/gui/themes/modern.ini	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/themes/modern.ini	2006-05-27 05:46:04 UTC (rev 22670)
@@ -1,7 +1,7 @@
 # $URL$
 # $Id$
 [theme]
-version=12
+version=13
 
 [pixmaps]
 dialog_corner=dialog_bkgd_corner.bmp
@@ -75,7 +75,7 @@
 dialog_start=246 224 139
 dialog_end=251 241 206
 
-color_state_disabled=128 128 128
+color_state_disabled=192 192 192
 color_state_highlight=100 162 8
 color_state_enabled=0 0 0
 
@@ -89,18 +89,18 @@
 widget_bkgd_small_start=246 224 139
 widget_bkgd_small_end=251 241 206
 
-button_bkgd_start=210 130 110
-button_bkgd_end=177 61 34
+button_bkgd_start=203 126 107
+button_bkgd_end=169 42 12
 button_bkgd_highlight_start=255 210 200
 button_bkgd_highlight_end=200 70 50
 button_text_enabled=255 255 255
-button_text_disabled=128 128 128
+button_text_disabled=192 192 192
 button_text_highlight=255 214 84
 
 slider_background_start=247 228 166
 slider_background_end=247 228 166
-slider_start=210 130 110
-slider_end=177 61 34
+slider_start=203 126 107
+slider_end=169 42 12
 slider_highlight_start=255 210 200
 slider_highlight_end=200 70 50
 
@@ -111,8 +111,8 @@
 scrollbar_background_end=247 228 166
 scrollbar_button_start=247 228 166
 scrollbar_button_end=247 228 166
-scrollbar_slider_start=210 130 110
-scrollbar_slider_end=177 61 34
+scrollbar_slider_start=203 126 107
+scrollbar_slider_end=169 42 12
 scrollbar_button_highlight_start=255 210 200
 scrollbar_button_highlight_end=200 70 50
 scrollbar_slider_highlight_start=255 210 200
@@ -137,9 +137,9 @@
 widget_small=3
 widget=3
 
-button=2
+button=1
 
-slider=2
+slider=1
 slider_bkgd=1
 
 tab=2
@@ -157,7 +157,7 @@
 shadow_top_height=2
 shadow_bottom_height=4
 inactive_dialog_shading=dim
-shading_dim_percent=20
+shading_dim_percent=15
 fontfile_normal=helvr12-l1.bdf
 fontfile_fixed_normal=courr12-l1.bdf
 cursor_hotspot_x=0
@@ -192,16 +192,22 @@
 
 ##### Widgets config
 ListWidget.leftPadding=7
-ListWidget.rightPadding=7
+ListWidget.rightPadding=5
 ListWidget.topPadding=5
 ListWidget.bottomPadding=5
 ListWidget.hlLeftPadding=0
 ListWidget.hlRightPadding=0
 PopUpWidget.leftPadding=7
-PopUpWidget.rightPadding=7
+PopUpWidget.rightPadding=5
+PopUpWidget.labelSpacing=3
+EditTextWidget.font=kFontStyleNormal
 EditTextWidget.leftPadding=7
-EditTextWidget.rightPadding=7
+EditTextWidget.rightPadding=5
 Console.font=kFontStyleFixedNormal
+Console.leftPadding=7
+Console.rightPadding=5
+Console.topPadding=5
+Console.bottomPadding=5
 
 ###### chooser
 opHeight=insetH
@@ -393,10 +399,12 @@
 # Saveload dialog
 scummsaveload=8 8 (w - 2 * 8) (h - 16)
 set_parent=scummsaveload
-scummsaveload_title=10 2 (parent.w - 2 * 10 - 180) kLineHeight
+scummsaveload_title=10 2 (parent.w - 2 * 10 - 180-20) kLineHeight
 scummsaveload_title.align=kTextAlignCenter
 scummsaveload_list=10 18 prev.w (parent.h - 17 - buttonHeight - 8 - self.y)
 scummsaveload_thumbnail=(parent.w - (kThumbnailWidth + 22)) 18
+scummsaveload_thumbnail.hPad=10
+scummsaveload_thumbnail.vPad=10
 scummsaveload_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
 scummsaveload_choose=(prev.x2 + 10) prev.y prev.w prev.h
 scummsaveload_extinfo.visible=true
@@ -414,9 +422,9 @@
 gcx=(opXoffset + 10)
 gcw=(parent.w - gcx - 25)
 grModePopup=(gcx - 5) (opYoffset - 1) (gcw + 5) kPopUpHeight
-opYoffset=(opYoffset + kLineHeight + 8)
+opYoffset=(opYoffset + kLineHeight + 12)
 grRenderPopup=prev.x (opYoffset - 1) prev.w prev.h
-opYoffset=(opYoffset + kLineHeight + 12)
+opYoffset=(opYoffset + kLineHeight + 16)
 grFullscreenCheckbox=gcx opYoffset (kFontHeight + 10 + 96) buttonHeight
 opYoffset=(opYoffset + buttonHeight + 4)
 grAspectCheckbox=prev.x opYoffset (kFontHeight + 10 + 136) prev.h

Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/widget.cpp	2006-05-27 05:46:04 UTC (rev 22670)
@@ -356,4 +356,20 @@
 	}
 }
 
+#pragma mark -
+
+ContainerWidget::ContainerWidget(GuiObject *boss, int x, int y, int w, int h) : Widget(boss, x, y, w, h) {
+	_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
+	_type = kContainerWidget;
+}
+
+ContainerWidget::ContainerWidget(GuiObject *boss, String name) : Widget(boss, name) {
+	_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
+	_type = kContainerWidget;
+}
+
+void ContainerWidget::drawWidget(bool hilite) {
+	g_gui.theme()->drawWidgetBackground(Common::Rect(_x, _y, _x + _w, _y + _h), _hints, Theme::kWidgetBackgroundBorder);
+}
+
 } // End of namespace GUI

Modified: scummvm/trunk/gui/widget.h
===================================================================
--- scummvm/trunk/gui/widget.h	2006-05-27 00:12:30 UTC (rev 22669)
+++ scummvm/trunk/gui/widget.h	2006-05-27 05:46:04 UTC (rev 22670)
@@ -58,7 +58,8 @@
 	kScrollBarWidget	= 'SCRB',
 	kPopUpWidget		= 'POPU',
 	kTabWidget			= 'TABW',
-	kGraphicsWidget		= 'GFXW'
+	kGraphicsWidget		= 'GFXW',
+	kContainerWidget	= 'CTNR'
 };
 
 enum {
@@ -279,6 +280,16 @@
 	bool _transparency;
 };
 
+/* ContainerWidget */
+class ContainerWidget : public Widget {
+public:
+	ContainerWidget(GuiObject *boss, int x, int y, int w, int h);
+	ContainerWidget(GuiObject *boss, Common::String name);
+
+protected:
+	void drawWidget(bool hilite);
+};
+
 } // End of namespace GUI
 
 #endif


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