diff options
author | Paul Gilbert | 2017-09-04 12:42:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-04 12:42:05 -0400 |
commit | 9a0798f38714eccd57f088af243a167bd1d39bc8 (patch) | |
tree | ef0f43539b17f7f37b63d2c9e9a49bc5abea248e /engines/titanic/game | |
parent | be208264dd2025f0034d0848b21d2652b164f153 (diff) | |
download | scummvm-rg350-9a0798f38714eccd57f088af243a167bd1d39bc8.tar.gz scummvm-rg350-9a0798f38714eccd57f088af243a167bd1d39bc8.tar.bz2 scummvm-rg350-9a0798f38714eccd57f088af243a167bd1d39bc8.zip |
TITANIC: Fix display of music system stop button when pressed
Diffstat (limited to 'engines/titanic/game')
-rw-r--r-- | engines/titanic/game/stop_phonograph_button.cpp | 11 | ||||
-rw-r--r-- | engines/titanic/game/stop_phonograph_button.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/engines/titanic/game/stop_phonograph_button.cpp b/engines/titanic/game/stop_phonograph_button.cpp index 75e0ca9337..51a7db34ce 100644 --- a/engines/titanic/game/stop_phonograph_button.cpp +++ b/engines/titanic/game/stop_phonograph_button.cpp @@ -26,6 +26,7 @@ namespace Titanic { BEGIN_MESSAGE_MAP(CStopPhonographButton, CBackground) ON_MESSAGE(MouseButtonDownMsg) + ON_MESSAGE(MouseButtonUpMsg) END_MESSAGE_MAP() void CStopPhonographButton::save(SimpleFile *file, int indent) { @@ -44,6 +45,16 @@ bool CStopPhonographButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (!queryMsg._value) { playMovie(0, 1, 0); + } + + return true; +} + +bool CStopPhonographButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { + CQueryPhonographState queryMsg; + queryMsg.execute(getParent()); + + if (!queryMsg._value) { playMovie(1, 0, 0); CPhonographStopMsg stopMsg; diff --git a/engines/titanic/game/stop_phonograph_button.h b/engines/titanic/game/stop_phonograph_button.h index d416c4f8fe..9388e6eda0 100644 --- a/engines/titanic/game/stop_phonograph_button.h +++ b/engines/titanic/game/stop_phonograph_button.h @@ -30,6 +30,7 @@ namespace Titanic { class CStopPhonographButton : public CBackground { DECLARE_MESSAGE_MAP; bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); public: CLASSDEF; |