aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/credits_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game/credits_button.cpp')
-rw-r--r--engines/titanic/game/credits_button.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/titanic/game/credits_button.cpp b/engines/titanic/game/credits_button.cpp
index 90bb1b5ebe..ee8f7bb329 100644
--- a/engines/titanic/game/credits_button.cpp
+++ b/engines/titanic/game/credits_button.cpp
@@ -24,6 +24,11 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CCreditsButton, CBackground)
+ ON_MESSAGE(MouseButtonUpMsg)
+ ON_MESSAGE(MouseButtonDownMsg)
+END_MESSAGE_MAP()
+
CCreditsButton::CCreditsButton() : CBackground(), _fieldE0(1) {
}
@@ -39,4 +44,19 @@ void CCreditsButton::load(SimpleFile *file) {
CBackground::load(file);
}
+bool CCreditsButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
+ return true;
+}
+
+bool CCreditsButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+ if (_fieldE0) {
+ playSound("a#20.wav");
+ CSignalObject signalMsg;
+ signalMsg._numValue = 1;
+ signalMsg.execute("CreditsPlayer");
+ }
+
+ return true;
+}
+
} // End of namespace Titanic