aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tsage/core.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 0ad1c43e8c..6a84b2521b 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1675,10 +1675,14 @@ void SceneItem::display(int resNum, int lineNum, ...) {
if (resNum) {
// Get required bounding size
- g_globals->gfxManager().getStringBounds(msg.c_str(), textRect, maxWidth);
- textRect.center(pos.x, pos.y);
+ GfxFont font;
+ font.setFontNumber(g_globals->_sceneText._fontNumber);
+ font.getStringBounds(msg.c_str(), textRect, maxWidth);
+ // Center the text at the specified position, and then constrain it to be-
+ textRect.center(pos.x, pos.y);
textRect.contain(g_globals->gfxManager()._bounds);
+
if (centerText) {
g_globals->_sceneText._color1 = g_globals->_sceneText._color2;
g_globals->_sceneText._color2 = 0;