aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/game/stop_phonograph_button.cpp11
-rw-r--r--engines/titanic/game/stop_phonograph_button.h1
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;