aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/game/stop_phonograph_button.cpp19
-rw-r--r--engines/titanic/game/stop_phonograph_button.h2
2 files changed, 8 insertions, 13 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
diff --git a/engines/titanic/game/stop_phonograph_button.h b/engines/titanic/game/stop_phonograph_button.h
index 9388e6eda0..07a19cc103 100644
--- a/engines/titanic/game/stop_phonograph_button.h
+++ b/engines/titanic/game/stop_phonograph_button.h
@@ -30,7 +30,7 @@ namespace Titanic {
class CStopPhonographButton : public CBackground {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
- bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
+ bool TimerMsg(CTimerMsg *msg);
public:
CLASSDEF;