diff options
author | Paul Gilbert | 2016-08-28 11:29:23 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-28 11:29:23 -0400 |
commit | 56c2ef9efc966286eefa451eba6f5acb1f58886f (patch) | |
tree | 6f856e9e387c9e61c53ad3df71fd2e808cc6306e /engines/titanic/game/stop_phonograph_button.cpp | |
parent | 1dcfe25808164c5f2540662028862ac8a0e56831 (diff) | |
download | scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.tar.gz scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.tar.bz2 scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.zip |
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/stop_phonograph_button.cpp')
-rw-r--r-- | engines/titanic/game/stop_phonograph_button.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/titanic/game/stop_phonograph_button.cpp b/engines/titanic/game/stop_phonograph_button.cpp index d18f4713ac..75e0ca9337 100644 --- a/engines/titanic/game/stop_phonograph_button.cpp +++ b/engines/titanic/game/stop_phonograph_button.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CStopPhonographButton, CBackground) + ON_MESSAGE(MouseButtonDownMsg) +END_MESSAGE_MAP() + void CStopPhonographButton::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); CBackground::save(file, indent); @@ -34,4 +38,19 @@ void CStopPhonographButton::load(SimpleFile *file) { CBackground::load(file); } +bool CStopPhonographButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + CQueryPhonographState queryMsg; + queryMsg.execute(getParent()); + + if (!queryMsg._value) { + playMovie(0, 1, 0); + playMovie(1, 0, 0); + + CPhonographStopMsg stopMsg; + stopMsg.execute(getParent()); + } + + return true; +} + } // End of namespace Titanic |