[Scummvm-git-logs] scummvm master -> 836eb4b61358aba0e7d054ff8293677ecca697e8

OMGPizzaGuy 48367439+OMGPizzaGuy at users.noreply.github.com
Tue Aug 25 00:22:34 UTC 2020


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:
836eb4b613 ULTIMA8: Update ttf scale rect to be valid as the top is negative


Commit: 836eb4b61358aba0e7d054ff8293677ecca697e8
    https://github.com/scummvm/scummvm/commit/836eb4b61358aba0e7d054ff8293677ecca697e8
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2020-08-24T19:22:01-05:00

Commit Message:
ULTIMA8: Update ttf scale rect to be valid as the top is negative

Changed paths:
    engines/ultima/ultima8/gumps/widgets/edit_widget.cpp
    engines/ultima/ultima8/gumps/widgets/text_widget.cpp


diff --git a/engines/ultima/ultima8/gumps/widgets/edit_widget.cpp b/engines/ultima/ultima8/gumps/widgets/edit_widget.cpp
index 4ef9ec0e85..de3ad17a4a 100644
--- a/engines/ultima/ultima8/gumps/widgets/edit_widget.cpp
+++ b/engines/ultima/ultima8/gumps/widgets/edit_widget.cpp
@@ -58,9 +58,9 @@ void EditWidget::InitGump(Gump *newparent, bool take_focus) {
 	_dims.moveTo(0, -font->getBaseline());
 
 	if (_gameFont && getFont()->isHighRes()) {
-		Rect rect(0, 0, 0, _dims.top);
+		Rect rect(_dims);
 		ScreenSpaceToGumpRect(rect, ROUND_OUTSIDE);
-		_dims.moveTo(0, rect.height());
+		_dims.moveTo(0, rect.top);
 	}
 }
 
diff --git a/engines/ultima/ultima8/gumps/widgets/text_widget.cpp b/engines/ultima/ultima8/gumps/widgets/text_widget.cpp
index 3c4a6f1590..d71f0fb2dd 100644
--- a/engines/ultima/ultima8/gumps/widgets/text_widget.cpp
+++ b/engines/ultima/ultima8/gumps/widgets/text_widget.cpp
@@ -62,9 +62,9 @@ void TextWidget::InitGump(Gump *newparent, bool take_focus) {
 	_dims.moveTo(0, -font->getBaseline());
 
 	if (_gameFont && getFont()->isHighRes()) {
-		Rect rect(0, 0, 0, _dims.top);
+		Rect rect(_dims);
 		ScreenSpaceToGumpRect(rect, ROUND_OUTSIDE);
-		_dims.moveTo(0, rect.height());
+		_dims.moveTo(0, rect.top);
 
 		// Note that GumpRectToScreenSpace is guaranteed to keep
 		// _targetWidth/_targetHeight zero if they already were.




More information about the Scummvm-git-logs mailing list