aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/eventman.h
diff options
context:
space:
mode:
authorFilippos Karapetis2016-01-15 20:56:15 +0200
committerFilippos Karapetis2016-01-15 21:03:57 +0200
commitafa75b70475ca47daba11c8bfacc7e61592cc0c6 (patch)
tree97ff0984e7c99501a3ae4c26a7e10f1abd140bb0 /engines/lab/eventman.h
parent71b665b617fe664f358c37110d13a7a611db4885 (diff)
downloadscummvm-rg350-afa75b70475ca47daba11c8bfacc7e61592cc0c6.tar.gz
scummvm-rg350-afa75b70475ca47daba11c8bfacc7e61592cc0c6.tar.bz2
scummvm-rg350-afa75b70475ca47daba11c8bfacc7e61592cc0c6.zip
LAB: Separate the interface from the event manager
Diffstat (limited to 'engines/lab/eventman.h')
-rw-r--r--engines/lab/eventman.h38
1 files changed, 1 insertions, 37 deletions
diff --git a/engines/lab/eventman.h b/engines/lab/eventman.h
index f26e2eba1c..e4114edbad 100644
--- a/engines/lab/eventman.h
+++ b/engines/lab/eventman.h
@@ -45,55 +45,20 @@ struct IntuiMessage {
Common::Point _mouse;
};
-struct Button {
- uint16 _x, _y, _buttonId;
- Common::KeyCode _keyEquiv; // the key which activates this button
- bool _isEnabled;
- Image *_image, *_altImage;
-};
-
-typedef Common::List<Button *> ButtonList;
-
class EventManager {
private:
LabEngine *_vm;
bool _leftClick;
bool _rightClick;
+ bool _buttonHit;
- Button *_hitButton;
- Button *_lastButtonHit;
- ButtonList *_screenButtonList;
Common::Point _mousePos;
Common::KeyState _keyPressed;
-private:
- /**
- * Checks whether or not the cords fall within one of the buttons in a list
- * of buttons.
- */
- Button *checkButtonHit(ButtonList *buttonList, Common::Point pos);
-
- /**
- * Checks whether or not the coords fall within one of the buttons in a list
- * of buttons.
- */
- Button *checkNumButtonHit(ButtonList *buttonList, Common::KeyCode key);
-
public:
EventManager (LabEngine *vm);
- void attachButtonList(ButtonList *buttonList);
- Button *createButton(uint16 x, uint16 y, uint16 id, Common::KeyCode key, Image *image, Image *altImage);
- void toggleButton(Button *button, uint16 penColor, bool enable);
-
- /**
- * Draws a button list to the screen.
- */
- void drawButtonList(ButtonList *buttonList);
- void freeButtonList(ButtonList *buttonList);
- Button *getButton(uint16 id);
-
IntuiMessage *getMsg();
/**
@@ -116,7 +81,6 @@ public:
* Moves the mouse to new co-ordinates.
*/
void setMousePos(Common::Point pos);
- void updateMouse();
Common::Point updateAndGetMousePos();
/**