From 63b8edea82e46be73486e90a41e81cf66e38be06 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 1 Jan 2017 16:05:58 -0500 Subject: TITANIC: Fix display of individual messages in MissiveOMat --- engines/titanic/core/game_object.h | 90 ++++++++++++++++++------------------ engines/titanic/game/missiveomat.cpp | 2 +- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index b367a0e722..629c6a038d 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -518,41 +518,6 @@ protected: */ void setMovieFrameRate(double rate); - /** - * Set up the text and borders for the object - */ - void setText(const CString &str, int border = 0, int borderRight = 0); - - /** - * Sets whether the text will use borders - */ - void setTextHasBorders(bool hasBorders); - - /** - * Sets the bounds for a previously defined text area - */ - void setTextBounds(); - - /** - * Sets the color for the object's text - */ - void setTextColor(byte r, byte g, byte b); - - /** - * Sets the font number to use for text - */ - void setTextFontNumber(int fontNumber); - - /** - * Gets the width of the text contents - */ - int getTextWidth() const; - - /** - * Returns the text cursor - */ - CTextCursor *getTextCursor() const; - /** * Gets a new random number */ @@ -737,32 +702,69 @@ public: */ CGameObject *getHiddenObject(const CString &name) const; + /** + * Support function for drag moving + */ + void dragMove(const Point &pt); + + /** + * Returns the currently dragging item (if any) if it's a game object + */ + CGameObject *getDraggingObject() const; + + bool compareRoomFlags(int mode, uint flags1, uint flags2); + + /*--- Text display methods ---*/ + /** * Sets up credits text */ void createCredits(); /** - * Scroll text up + * Set up the text and borders for the object */ - void scrollTextUp(); + void setText(const CString &str, int border = 0, int borderRight = 0); /** - * Scroll text down + * Sets whether the text will use borders */ - void scrollTextDown(); + void setTextHasBorders(bool hasBorders); /** - * Support function for drag moving + * Sets the bounds for a previously defined text area */ - void dragMove(const Point &pt); + void setTextBounds(); /** - * Returns the currently dragging item (if any) if it's a game object + * Sets the color for the object's text */ - CGameObject *getDraggingObject() const; + void setTextColor(byte r, byte g, byte b); - bool compareRoomFlags(int mode, uint flags1, uint flags2); + /** + * Sets the font number to use for text + */ + void setTextFontNumber(int fontNumber); + + /** + * Gets the width of the text contents + */ + int getTextWidth() const; + + /** + * Scroll text up + */ + void scrollTextUp(); + + /** + * Scroll text down + */ + void scrollTextDown(); + + /** + * Returns the text cursor + */ + CTextCursor *getTextCursor() const; /*--- CGameManager Methods ---*/ diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp index a244109801..e48da78af6 100644 --- a/engines/titanic/game/missiveomat.cpp +++ b/engines/titanic/game/missiveomat.cpp @@ -297,7 +297,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { _messageNum + 1, _totalMessages, _from[_messageNum].c_str(), _to[_messageNum].c_str(), _messages[_messageNum].c_str()); - setText(str); + welcome->setText(str); } break; -- cgit v1.2.3