diff options
author | Paul Gilbert | 2016-04-06 23:28:42 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-04-06 23:28:42 -0400 |
commit | 51dc36a9a52f95815b4b1109b080d070247bf247 (patch) | |
tree | d53d8c288a593fd897536f943debbd2d7b46275e /engines/titanic/gfx | |
parent | 51df4d98d3a066e092f34cf7968c436a3e430df2 (diff) | |
download | scummvm-rg350-51dc36a9a52f95815b4b1109b080d070247bf247.tar.gz scummvm-rg350-51dc36a9a52f95815b4b1109b080d070247bf247.tar.bz2 scummvm-rg350-51dc36a9a52f95815b4b1109b080d070247bf247.zip |
TITANIC: Furhter in-progress message handling conversion
Diffstat (limited to 'engines/titanic/gfx')
-rw-r--r-- | engines/titanic/gfx/st_button.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/gfx/st_button.h | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/engines/titanic/gfx/st_button.cpp b/engines/titanic/gfx/st_button.cpp index 387800430f..154122ed60 100644 --- a/engines/titanic/gfx/st_button.cpp +++ b/engines/titanic/gfx/st_button.cpp @@ -24,6 +24,12 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CSTButton, CBackground) + ON_MESSAGE(MouseButtonDownMsg) + ON_MESSAGE(MouseButtonUpMsg) + ON_MESSAGE(EnterViewMsg) +END_MESSAGE_MAP() + CSTButton::CSTButton() : CBackground() { _statusInc = 0; _statusTarget = "NULL"; @@ -60,14 +66,14 @@ void CSTButton::load(SimpleFile *file) { CBackground::load(file); } -bool CSTButton::handleMessage(CMouseButtonDownMsg &msg) { +bool CSTButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { changeStatus(0); // TODO: Obj6c stuff return true; } -bool CSTButton::handleMessage(CMouseButtonUpMsg &msg) { +bool CSTButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { int oldStatus = _currentStatus; int newStatus = _currentStatus + _statusInc; @@ -82,7 +88,7 @@ bool CSTButton::handleMessage(CMouseButtonUpMsg &msg) { return true; } -bool CSTButton::handleMessage(CEnterViewMsg &msg) { +bool CSTButton::EnterViewMsg(CEnterViewMsg *msg) { loadFrame(_buttonFrame); return true; } diff --git a/engines/titanic/gfx/st_button.h b/engines/titanic/gfx/st_button.h index d613ad0eea..fd2b0fa401 100644 --- a/engines/titanic/gfx/st_button.h +++ b/engines/titanic/gfx/st_button.h @@ -29,10 +29,8 @@ namespace Titanic { -class CSTButton : public CBackground, - public CMouseButtonDownMsgTarget, - public CMouseButtonUpMsgTarget, - public CEnterViewMsgTarget { +class CSTButton : public CBackground { + DECLARE_MESSAGE_MAP private: int _statusInc; CString _statusTarget; @@ -42,9 +40,9 @@ private: CString _string5; int _buttonFrame; protected: - virtual bool handleMessage(CMouseButtonDownMsg &msg); - virtual bool handleMessage(CMouseButtonUpMsg &msg); - virtual bool handleMessage(CEnterViewMsg &msg); + virtual bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); + virtual bool EnterViewMsg(CEnterViewMsg *msg); public: CLASSDEF CSTButton(); |