aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/eventman.h
diff options
context:
space:
mode:
authorStrangerke2015-12-13 14:04:00 +0100
committerWillem Jan Palenstijn2015-12-23 21:34:02 +0100
commitc837e67070913166177a19b2d0d6d925d4569c83 (patch)
tree9c6b22c7f59ce00a4473520519da8e93a281e569 /engines/lab/eventman.h
parent7efd471a92ca6a8d9f7e2c9acdd17be847b7ef73 (diff)
downloadscummvm-rg350-c837e67070913166177a19b2d0d6d925d4569c83.tar.gz
scummvm-rg350-c837e67070913166177a19b2d0d6d925d4569c83.tar.bz2
scummvm-rg350-c837e67070913166177a19b2d0d6d925d4569c83.zip
LAB: Move interface functions to EventMan
Diffstat (limited to 'engines/lab/eventman.h')
-rw-r--r--engines/lab/eventman.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/engines/lab/eventman.h b/engines/lab/eventman.h
index 420c7d03df..f9facd815b 100644
--- a/engines/lab/eventman.h
+++ b/engines/lab/eventman.h
@@ -31,11 +31,28 @@
#ifndef LAB_EVENTMAN_H
#define LAB_EVENTMAN_H
-namespace Lab {
+#include "common/events.h"
-struct Gadget;
+namespace Lab {
class LabEngine;
+class Image;
+
+struct IntuiMessage {
+ uint32 _msgClass;
+ uint16 _code, _qualifier, _mouseX, _mouseY, _gadgetID;
+ uint32 _seconds, _micros;
+};
+
+
+struct Gadget {
+ uint16 x, y, _gadgetID;
+ uint16 _keyEquiv; // if not zero, a key that activates gadget
+ bool isEnabled;
+ Image *_image, *_altImage;
+};
+
+typedef Common::List<Gadget *> GadgetList;
class EventManager {
private:
@@ -56,6 +73,7 @@ public:
GadgetList *_screenGadgetList;
Gadget *_hitGadget;
+ Common::KeyState _keyPressed;
Gadget *checkGadgetHit(GadgetList *gadgetList, Common::Point pos);
void initMouse();
@@ -74,6 +92,15 @@ public:
void processInput(bool can_delay = false);
uint16 getNextChar();
Common::Point updateAndGetMousePos();
+
+ Gadget *checkNumGadgetHit(GadgetList *gadgetList, uint16 key);
+ Gadget *createButton(uint16 x, uint16 y, uint16 id, uint16 key, Image *im, Image *imalt);
+ void freeButtonList(GadgetList *gadgetList);
+ void drawGadgetList(GadgetList *gadgetList);
+ void disableGadget(Gadget *curgad, uint16 pencolor);
+ void enableGadget(Gadget *curgad);
+ IntuiMessage *getMsg();
+ uint16 makeGadgetKeyEquiv(uint16 key);
};
} // End of namespace Lab