From 9a0798f38714eccd57f088af243a167bd1d39bc8 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 4 Sep 2017 12:42:05 -0400 Subject: TITANIC: Fix display of music system stop button when pressed --- engines/titanic/game/stop_phonograph_button.cpp | 11 +++++++++++ engines/titanic/game/stop_phonograph_button.h | 1 + 2 files changed, 12 insertions(+) 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; -- cgit v1.2.3