aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/gfx
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-25 20:46:33 -0400
committerPaul Gilbert2016-08-25 20:46:33 -0400
commit1f0b9cb68d02d956ec745bef16f0dbddaa743bec (patch)
tree1caba7007cc529982bd5932923d33b5cf8569853 /engines/titanic/gfx
parentdb179c11bb7d8f82183e39e2778491ead55d875e (diff)
downloadscummvm-rg350-1f0b9cb68d02d956ec745bef16f0dbddaa743bec.tar.gz
scummvm-rg350-1f0b9cb68d02d956ec745bef16f0dbddaa743bec.tar.bz2
scummvm-rg350-1f0b9cb68d02d956ec745bef16f0dbddaa743bec.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/gfx')
-rw-r--r--engines/titanic/gfx/move_object_button.cpp15
-rw-r--r--engines/titanic/gfx/move_object_button.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/titanic/gfx/move_object_button.cpp b/engines/titanic/gfx/move_object_button.cpp
index bdc90a673c..bcd2b2bd76 100644
--- a/engines/titanic/gfx/move_object_button.cpp
+++ b/engines/titanic/gfx/move_object_button.cpp
@@ -21,9 +21,14 @@
*/
#include "titanic/gfx/move_object_button.h"
+#include "titanic/core/project_item.h"
namespace Titanic {
+BEGIN_MESSAGE_MAP(CMoveObjectButton, CSTButton)
+ ON_MESSAGE(MouseButtonUpMsg)
+END_MESSAGE_MAP()
+
CMoveObjectButton::CMoveObjectButton() : CSTButton(), _field11C(1) {
}
@@ -43,4 +48,14 @@ void CMoveObjectButton::load(SimpleFile *file) {
CSTButton::load(file);
}
+bool CMoveObjectButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
+ CGameObject *obj = dynamic_cast<CGameObject *>(getRoot()->findByName(_actionTarget));
+ if (obj) {
+ obj->petAddToInventory();
+ obj->setVisible(_field11C);
+ }
+
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/gfx/move_object_button.h b/engines/titanic/gfx/move_object_button.h
index eb2fdc4ff2..46c49c36e2 100644
--- a/engines/titanic/gfx/move_object_button.h
+++ b/engines/titanic/gfx/move_object_button.h
@@ -28,6 +28,8 @@
namespace Titanic {
class CMoveObjectButton : public CSTButton {
+ DECLARE_MESSAGE_MAP;
+ bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
private:
Point _pos1;
int _field11C;