diff options
-rw-r--r-- | engines/titanic/core/game_object.h | 20 | ||||
-rw-r--r-- | engines/titanic/game/missiveomat.cpp | 15 |
2 files changed, 18 insertions, 17 deletions
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index fe2eebfafb..6671cbf4be 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -554,16 +554,6 @@ protected: CTextCursor *getTextCursor() const; /** - * Scroll text up - */ - void scrollTextUp(); - - /** - * Scroll text down - */ - void scrollTextDown(); - - /** * Gets a new random number */ int getRandomNumber(int max, int *oldVal = nullptr); @@ -753,6 +743,16 @@ public: void createCredits(); /** + * Scroll text up + */ + void scrollTextUp(); + + /** + * Scroll text down + */ + void scrollTextDown(); + + /** * Support function for drag moving */ void dragMove(const Point &pt); diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp index 56293c13a9..e3ce5d8502 100644 --- a/engines/titanic/game/missiveomat.cpp +++ b/engines/titanic/game/missiveomat.cpp @@ -220,14 +220,15 @@ bool CMissiveOMat::TimerMsg(CTimerMsg *msg) { } bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { - CTreeItem *welcome = findByName("MissiveOMat Welcome"); + CGameObject *welcome = static_cast<CGameObject *>(findByName("MissiveOMat Welcome")); switch (msg->_action) { case MESSAGE_SHOW: { - CTreeItem *btnOk = findRoom()->findByName("MissiveOMat OK Button"); - CTreeItem *btnNext = findRoom()->findByName("MissiveOMat Next Button"); - CTreeItem *btnPrev = findRoom()->findByName("MissiveOMat Prev Button"); - CTreeItem *btnLogout = findRoom()->findByName("MissiveOMat Logout Button"); + CRoomItem *room = findRoom(); + CTreeItem *btnOk = room->findByName("MissiveOMat OK Button"); + CTreeItem *btnNext = room->findByName("MissiveOMat Next Button"); + CTreeItem *btnPrev = room->findByName("MissiveOMat Prev Button"); + CTreeItem *btnLogout = room->findByName("MissiveOMat Logout Button"); _mode = MMODE_5; CVisibleMsg visibleMsg; @@ -277,12 +278,12 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { case MESSAGE_DOWN: if (welcome) - scrollTextDown(); + welcome->scrollTextDown(); break; case MESSAGE_UP: if (welcome) - scrollTextUp(); + welcome->scrollTextUp(); break; case REDRAW_MESSAGE: |