[Scummvm-cvs-logs] scummvm master -> 6e4e4e50a5c36518e0dc55585ad19101e88f8d05

dreammaster dreammaster at scummvm.org
Sat Jun 4 09:23:51 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6e4e4e50a5 TSAGE: Fix one pixel difference in dialog positioning


Commit: 6e4e4e50a5c36518e0dc55585ad19101e88f8d05
    https://github.com/scummvm/scummvm/commit/6e4e4e50a5c36518e0dc55585ad19101e88f8d05
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-06-04T00:22:09-07:00

Commit Message:
TSAGE: Fix one pixel difference in dialog positioning

For some unknown reason, the CD version introduced a one pixel Y difference for dialogs.

Changed paths:
    engines/tsage/dialogs.cpp
    engines/tsage/graphics.cpp



diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index 1d129a8..de24119 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -43,20 +43,20 @@ MessageDialog::MessageDialog(const Common::String &message, const Common::String
 							 const Common::String &btn2Message) : GfxDialog() {
 	// Set up the message
 	addElements(&_msg, &_btn1, NULL);
-
+ 
 	_msg.set(message, 200, ALIGN_LEFT);
-	_btn1._bounds.moveTo(_msg._bounds.left, _msg._bounds.bottom + 2);
+	_msg._bounds.moveTo(0, 0);
 	_defaultButton = &_btn1;
 
 	// Set up the first button
 	_btn1.setText(btn1Message);
-	_btn1._bounds.moveTo(_msg._bounds.right - _btn1._bounds.width(), _msg._bounds.bottom);
+	_btn1._bounds.moveTo(_msg._bounds.right - _btn1._bounds.width(), _msg._bounds.bottom + 2);
 
 	if (!btn2Message.empty()) {
 		// Set up the second button
 		add(&_btn2);
 		_btn2.setText(btn2Message);
-		_btn2._bounds.moveTo(_msg._bounds.right - _btn2._bounds.width(), _msg._bounds.bottom);
+		_btn2._bounds.moveTo(_msg._bounds.right - _btn2._bounds.width(), _msg._bounds.bottom + 2);
 		_btn1._bounds.translate(-(_btn2._bounds.width() + 4), 0);
 	}
 
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 85ff6d6..4e3c038 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -809,8 +809,10 @@ void GfxButton::setDefaults() {
 	gfxManager._font.getStringBounds(_message.c_str(), tempRect, 240);
 	tempRect.right = ((tempRect.right + 15) / 16) * 16;
 
-	// Set the button bounds to a reduced area
+	// Set the button bounds 
 	tempRect.collapse(-_globals->_gfxEdgeAdjust, -_globals->_gfxEdgeAdjust);
+	if (_vm->getFeatures() & GF_CD)
+		--tempRect.top;
 	tempRect.moveTo(_bounds.left, _bounds.top);
 	_bounds = tempRect;
 }






More information about the Scummvm-git-logs mailing list