aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/stop_phonograph_button.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-09-09 11:01:45 -0400
committerPaul Gilbert2017-09-09 11:01:45 -0400
commit8fb2371f6fde6f82608b1f40e446cce2f5f8bf26 (patch)
tree53fec3bca4a2da39d4b70ea9881b04df21c23e71 /engines/titanic/game/stop_phonograph_button.cpp
parentb5ae92701482665b447e63b074e61b103b3730d7 (diff)
downloadscummvm-rg350-8fb2371f6fde6f82608b1f40e446cce2f5f8bf26.tar.gz
scummvm-rg350-8fb2371f6fde6f82608b1f40e446cce2f5f8bf26.tar.bz2
scummvm-rg350-8fb2371f6fde6f82608b1f40e446cce2f5f8bf26.zip
TITANIC: Fix play/stop operation for 1st Class Restaurant Phonograph
Diffstat (limited to 'engines/titanic/game/stop_phonograph_button.cpp')
-rw-r--r--engines/titanic/game/stop_phonograph_button.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/engines/titanic/game/stop_phonograph_button.cpp b/engines/titanic/game/stop_phonograph_button.cpp
index 51a7db34ce..fb3451238c 100644
--- a/engines/titanic/game/stop_phonograph_button.cpp
+++ b/engines/titanic/game/stop_phonograph_button.cpp
@@ -26,7 +26,7 @@ namespace Titanic {
BEGIN_MESSAGE_MAP(CStopPhonographButton, CBackground)
ON_MESSAGE(MouseButtonDownMsg)
- ON_MESSAGE(MouseButtonUpMsg)
+ ON_MESSAGE(TimerMsg)
END_MESSAGE_MAP()
void CStopPhonographButton::save(SimpleFile *file, int indent) {
@@ -45,17 +45,7 @@ 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);
+ addTimer(200);
CPhonographStopMsg stopMsg;
stopMsg.execute(getParent());
@@ -64,4 +54,9 @@ bool CStopPhonographButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
return true;
}
+bool CStopPhonographButton::TimerMsg(CTimerMsg *msg) {
+ playMovie(1, 0, 0);
+ return true;
+}
+
} // End of namespace Titanic