From 73085bf57034adc2dbf5994ce2c6930b416eee7d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 23 Mar 2015 20:34:34 -0400 Subject: SHERLOCK: Beginnings of UserInterface class --- engines/sherlock/events.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'engines/sherlock/events.h') diff --git a/engines/sherlock/events.h b/engines/sherlock/events.h index e939b5768f..1c5fbc5be4 100644 --- a/engines/sherlock/events.h +++ b/engines/sherlock/events.h @@ -44,12 +44,17 @@ private: uint32 _priorFrameTime; Common::Point _mousePos; ImageFile *_cursorImages; + int _mouseButtons; bool checkForNextFrameCounter(); public: CursorId _cursorId; - byte _mouseButtons; - bool _mouseClicked; + bool _pressed; + bool _released; + bool _rightPressed; + bool _rightReleased; + bool _oldButtons; + bool _oldRightButton; Common::Stack _pendingKeys; public: Events(SherlockEngine *vm); @@ -75,7 +80,7 @@ public: uint32 getFrameCounter() const { return _frameCounter; } - bool isKeyPressed() const { return !_pendingKeys.empty(); } + bool kbHit() const { return !_pendingKeys.empty(); } Common::KeyState getKey() { return _pendingKeys.pop(); } @@ -85,8 +90,9 @@ public: bool delay(uint32 time, bool interruptable = false); - void waitForNextFrame(); + void setButtonState(); + bool checkInput(); }; } // End of namespace Sherlock -- cgit v1.2.3