diff options
author | Paul Gilbert | 2015-06-27 14:40:51 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-27 14:40:51 -0400 |
commit | 9cfe5c12968bdb53fb552615a354180b04778e29 (patch) | |
tree | 1a30f80ff4bdef5d6e17ece064f24498ba3934c1 /engines/sherlock/tattoo | |
parent | 8faef1c52cdb0b223d7f5adcd667d278f4d90f78 (diff) | |
download | scummvm-rg350-9cfe5c12968bdb53fb552615a354180b04778e29.tar.gz scummvm-rg350-9cfe5c12968bdb53fb552615a354180b04778e29.tar.bz2 scummvm-rg350-9cfe5c12968bdb53fb552615a354180b04778e29.zip |
SHERLOCK: RT: Fix display of talk text windows
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_talk.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.h | 5 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_text.cpp | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp index 4868ef5ae0..d7d85f48dd 100644 --- a/engines/sherlock/tattoo/tattoo_talk.cpp +++ b/engines/sherlock/tattoo/tattoo_talk.cpp @@ -184,7 +184,7 @@ TattooTalk::TattooTalk(SherlockEngine *vm) : Talk(vm), _talkWidget(vm) { void TattooTalk::talkInterface(const byte *&str) { TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui; - const char *s = (const char *)str; + const byte *s = str; // Move to past the end of the text string _charCount = 0; @@ -195,7 +195,7 @@ void TattooTalk::talkInterface(const byte *&str) { // Display the text window ui.banishWindow(); - ui._textWidget.load(s, _speaker); + ui._textWidget.load(Common::String((const char *)s, (const char *)str), _speaker); ui._textWidget.summonWindow(); _wait = true; } diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index e309875ef7..ff98706844 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -865,6 +865,10 @@ void TattooUserInterface::banishWindow() { _widget = nullptr; } +void TattooUserInterface::clearWindow() { + banishWindow(); +} + } // End of namespace Tattoo } // End of namespace Sherlock diff --git a/engines/sherlock/tattoo/tattoo_user_interface.h b/engines/sherlock/tattoo/tattoo_user_interface.h index 5b623e74ba..527f326498 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.h +++ b/engines/sherlock/tattoo/tattoo_user_interface.h @@ -225,6 +225,11 @@ public: * Draw the user interface onto the screen's back buffers */ virtual void drawInterface(int bufferNum = 3); + + /** + * Clear any active text window + */ + virtual void clearWindow(); }; } // End of namespace Tattoo diff --git a/engines/sherlock/tattoo/widget_text.cpp b/engines/sherlock/tattoo/widget_text.cpp index 5c2e7e087f..dd696b1a87 100644 --- a/engines/sherlock/tattoo/widget_text.cpp +++ b/engines/sherlock/tattoo/widget_text.cpp @@ -152,6 +152,8 @@ void WidgetText::centerWindowOnSpeaker(int speaker) { pt.y = SHERLOCK_SCREEN_HEIGHT / 2 - _bounds.height() / 2; } } + + _bounds.moveTo(pt); } void WidgetText::render(const Common::String &str) { |