[Scummvm-git-logs] scummvm master -> 9a0798f38714eccd57f088af243a167bd1d39bc8
dreammaster
dreammaster at scummvm.org
Mon Sep 4 18:42:13 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9a0798f387 TITANIC: Fix display of music system stop button when pressed
Commit: 9a0798f38714eccd57f088af243a167bd1d39bc8
https://github.com/scummvm/scummvm/commit/9a0798f38714eccd57f088af243a167bd1d39bc8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-04T12:42:05-04:00
Commit Message:
TITANIC: Fix display of music system stop button when pressed
Changed paths:
engines/titanic/game/stop_phonograph_button.cpp
engines/titanic/game/stop_phonograph_button.h
diff --git a/engines/titanic/game/stop_phonograph_button.cpp b/engines/titanic/game/stop_phonograph_button.cpp
index 75e0ca9..51a7db3 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 d416c4f..9388e6e 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;
More information about the Scummvm-git-logs
mailing list