[Scummvm-cvs-logs] scummvm master -> dee398ad6caf741d1bcd81d1a32b26d08ad066d7
dreammaster
dreammaster at scummvm.org
Thu May 5 12:50:32 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:
dee398ad6c TSAGE: Fixed problem with text being partly off-screen in Scene #9500
Commit: dee398ad6caf741d1bcd81d1a32b26d08ad066d7
https://github.com/scummvm/scummvm/commit/dee398ad6caf741d1bcd81d1a32b26d08ad066d7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-05-05T03:48:46-07:00
Commit Message:
TSAGE: Fixed problem with text being partly off-screen in Scene #9500
Changed paths:
engines/tsage/converse.cpp
engines/tsage/core.cpp
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 46ca557..789ec8f 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -349,17 +349,19 @@ void SequenceManager::setMessage(int resNum, int lineNum, int color, const Commo
// Get the display message
Common::String msg = _resourceManager->getMessage(resNum, lineNum);
- // Get the needed rect, and move it to the desired position
- Rect textRect;
- _globals->gfxManager().getStringBounds(msg.c_str(), textRect, width);
+ // Set the text message
+ _sceneText.setup(msg);
+
+ // Move the text to the correct position
+ Rect textRect = _sceneText._bounds;
Rect sceneBounds = _globals->_sceneManager._scene->_sceneBounds;
sceneBounds.collapse(4, 2);
textRect.moveTo(pt);
textRect.contain(sceneBounds);
- // Set the text message
- _sceneText.setup(msg);
_sceneText.setPosition(Common::Point(textRect.left, textRect.top));
+
+ // Draw the text
_sceneText.fixPriority(255);
_sceneText.show();
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index da80111..86219a7 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -2535,6 +2535,8 @@ void SceneText::setup(const Common::String &msg) {
gfxMan._font._colors2.foreground = _color3;
gfxMan.getStringBounds(msg.c_str(), textRect, _width);
+ _bounds.setWidth(textRect.width());
+ _bounds.setHeight(textRect.height());
// Set up a new blank surface to hold the text
_textSurface.create(textRect.width(), textRect.height());
More information about the Scummvm-git-logs
mailing list