[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.156,1.157 dialogs.h,1.59,1.60

Johannes Schickel lordhoto at users.sourceforge.net
Sat Jan 28 15:04:03 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31992/scumm

Modified Files:
	dialogs.cpp dialogs.h 
Log Message:
- Fixes a bug that the debugger crashed while opening
- Changed gradient calculating
- added background saving for all dialog/widget backgrounds for now (change that later maybe)
- changed ScummDialog to use the colors of our launcher dialog


Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- dialogs.cpp	27 Jan 2006 15:43:23 -0000	1.156
+++ dialogs.cpp	28 Jan 2006 23:03:39 -0000	1.157
@@ -153,6 +153,11 @@
 
 #pragma mark -
 
+ScummDialog::ScummDialog(ScummEngine *scumm, int x, int y, int w, int h)
+	: GUI::Dialog(x, y, w, h), _vm(scumm) {
+_drawingHints |= GUI::THEME_HINT_SPECIAL_COLOR;
+}
+
 const Common::String ScummDialog::queryResString(int stringno) {
 	byte buf[256];
 	byte *result;
@@ -743,6 +748,7 @@
 
 HelpDialog::HelpDialog(ScummEngine *scumm)
 	: ScummDialog(scumm, 5, 5, 310, 190) {
+	_drawingHints &= ~GUI::THEME_HINT_SPECIAL_COLOR;
 
 	const int screenW = g_system->getOverlayWidth();
 	const int screenH = g_system->getOverlayHeight();
@@ -926,7 +932,7 @@
 
 void ValueDisplayDialog::drawDialog() {
 	const int labelWidth = _w - 8 - _percentBarWidth;
-	g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h));
+	g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h), GUI::THEME_HINT_SAVE_BACKGROUND | GUI::THEME_HINT_FIRST_DRAW);
 	g_gui.theme()->drawText(Common::Rect(_x+4, _y+4, _x+labelWidth+4, _y+g_gui.theme()->getFontHeight()+4), _label);
 	g_gui.theme()->drawSlider(Common::Rect(_x+4+labelWidth, _y+4, _x+_w-4, _y+_h-4), _percentBarWidth * (_value - _min) / (_max - _min));
 }

Index: dialogs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- dialogs.h	18 Jan 2006 17:39:40 -0000	1.59
+++ dialogs.h	28 Jan 2006 23:03:39 -0000	1.60
@@ -41,8 +41,7 @@
 
 class ScummDialog : public GUI::Dialog {
 public:
-	ScummDialog(ScummEngine *scumm, int x, int y, int w, int h)
-		: GUI::Dialog(x, y, w, h), _vm(scumm) {}
+	ScummDialog(ScummEngine *scumm, int x, int y, int w, int h);
 
 protected:
 	typedef Common::String String;





More information about the Scummvm-git-logs mailing list