diff options
author | Vladimir Menshakov | 2009-12-05 06:03:24 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-12-05 06:03:24 +0000 |
commit | 19eff3b77480fd9a9d32ae6563e505f7ffd25da1 (patch) | |
tree | 59aa77cee490ba9a194e6fd446864616f8ceba97 /engines | |
parent | 7aa92b7dcc8ae0e8019fb0bc72f4eb6dfdaec92e (diff) | |
download | scummvm-rg350-19eff3b77480fd9a9d32ae6563e505f7ffd25da1.tar.gz scummvm-rg350-19eff3b77480fd9a9d32ae6563e505f7ffd25da1.tar.bz2 scummvm-rg350-19eff3b77480fd9a9d32ae6563e505f7ffd25da1.zip |
fixed multiline message positioning
svn-id: r46264
Diffstat (limited to 'engines')
-rw-r--r-- | engines/teenagent/scene.cpp | 7 |
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; |