[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.h,1.46,1.47 dialogs.cpp,1.125,1.126

Max Horn fingolfin at users.sourceforge.net
Tue Mar 8 15:44:28 CET 2005


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

Modified Files:
	dialogs.h dialogs.cpp 
Log Message:
Fix for bug #1158465 (New Volume Control Dialogue Error-Prone)

Index: dialogs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.h,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- dialogs.h	8 Mar 2005 00:44:58 -0000	1.46
+++ dialogs.h	8 Mar 2005 23:44:07 -0000	1.47
@@ -173,9 +173,9 @@
 public:
 	ValueDisplayDialog(const Common::String& label, int minVal, int maxVal, int val, uint16 incKey, uint16 decKey);
 
-	void drawDialog();
-	void handleTickle();
-
+	virtual void open();
+	virtual void drawDialog();
+	virtual void handleTickle();
 	virtual void handleMouseDown(int x, int y, int button, int clickCount) { 
 		close();
 	}

Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- dialogs.cpp	8 Mar 2005 00:48:20 -0000	1.125
+++ dialogs.cpp	8 Mar 2005 23:44:07 -0000	1.126
@@ -608,9 +608,6 @@
 
 	_x = (320 - width) / 2;
 	_w = width;
-	setResult(_value);
-
-	_timer = getMillis() + kDisplayDelay;
 }
 
 void ValueDisplayDialog::drawDialog() {
@@ -646,11 +643,16 @@
 		_timer = getMillis() + kDisplayDelay;
 		draw();
 	} else {
-		setResult(_value);
 		close();
 	}
 }
 
+void ValueDisplayDialog::open() {
+	GUI::Dialog::open();
+	setResult(_value);
+	_timer = getMillis() + kDisplayDelay;
+}
+
 
 
 } // End of namespace Scumm





More information about the Scummvm-git-logs mailing list