diff options
author | Paul Gilbert | 2015-06-24 21:05:45 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-24 21:05:45 -0400 |
commit | 7f57db2a26cb5192c3e010afb5d48f670353a524 (patch) | |
tree | 935428dcb3b60bbc8fbf117d04f3a2ce4c7fd611 | |
parent | 750c125ea4340cb3de04b8d0e3442dc38c8cdb51 (diff) | |
download | scummvm-rg350-7f57db2a26cb5192c3e010afb5d48f670353a524.tar.gz scummvm-rg350-7f57db2a26cb5192c3e010afb5d48f670353a524.tar.bz2 scummvm-rg350-7f57db2a26cb5192c3e010afb5d48f670353a524.zip |
SHERLOCK: RT: Fix look dialog not appearing
-rw-r--r-- | engines/sherlock/tattoo/widget_text.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/sherlock/tattoo/widget_text.cpp b/engines/sherlock/tattoo/widget_text.cpp index f4e4b6e9af..ace4fd43ca 100644 --- a/engines/sherlock/tattoo/widget_text.cpp +++ b/engines/sherlock/tattoo/widget_text.cpp @@ -43,7 +43,7 @@ void WidgetText::load(const Common::String &str) { int height; for (;;) { - _remainingText = splitLines(str, lines, width - _surface.widestChar() * 2, 100); + splitLines(str, lines, width - _surface.widestChar() * 2, 100); height = (screen.fontHeight() + 1) * lines.size() + 9; if ((width - _surface.widestChar() * 2 > height * 3 / 2) || (width - _surface.widestChar() * 2 @@ -62,14 +62,11 @@ void WidgetText::load(const Common::String &str) { width += _surface.charWidth(*strP++); } - _bounds.setWidth(width); - _bounds.setHeight(height); - _bounds.translate(ui._lookPos.x - width / 2, ui._lookPos.y - height / 2); - checkMenuPosition(); + Common::Rect bounds(width, height); + bounds.translate(ui._lookPos.x - width / 2, ui._lookPos.y - height / 2); + load(str, bounds); } else { - // Split up the string into lines in preparation for drawing - _remainingText = splitLines(str, lines, _bounds.width() - _surface.widestChar() * 2, - (_bounds.height() - _surface.fontHeight() / 2) / (_surface.fontHeight() + 1)); + load(str, _bounds); } } @@ -77,6 +74,7 @@ void WidgetText::load(const Common::String &str, const Common::Rect &bounds) { Common::StringArray lines; _remainingText = splitLines(str, lines, bounds.width() - _surface.widestChar() * 2, bounds.height() / (_surface.fontHeight() + 1)); + _bounds = bounds; // Allocate a surface for the window _surface.create(_bounds.width(), _bounds.height()); |