aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/teenagent/scene.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index d64c00c9c4..0c826bdb87 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -971,8 +971,13 @@ Object *Scene::getObject(int id, int scene_id) {
Common::Point Scene::messagePosition(const Common::String &str, Common::Point position) {
Resources *res = Resources::instance();
+ int lines = 1;
+ for(uint i = 0; i < str.size(); ++i)
+ if (str[i] == '\n')
+ ++lines;
+
uint w = res->font7.render(NULL, 0, 0, str, 0);
- uint h = res->font7.height + 3;
+ uint h = res->font7.height * lines + 3;
position.x -= w / 2;
position.y -= h;