22 #ifndef TITANIC_EVENTS_H 23 #define TITANIC_EVENTS_H 25 #include "common/scummsys.h" 26 #include "common/events.h" 27 #include "common/stack.h" 28 #include "support/rect.h" 32 #define GAME_FRAME_RATE 30 33 #define GAME_FRAME_TIME (1000 / GAME_FRAME_RATE) 34 #define DOUBLE_CLICK_TIME 100 37 MK_LBUTTON = 1, MK_RBUTTON = 2, MK_SHIFT = 4, MK_CONTROL = 8,
59 virtual void leftButtonDown(
const Point &mousePos) {}
60 virtual void leftButtonUp(
const Point &mousePos) {}
61 virtual void leftButtonDoubleClick(
const Point &mousePos) {}
62 virtual void middleButtonDown(
const Point &mousePos) {}
63 virtual void middleButtonUp(
const Point &mousePos) {}
64 virtual void middleButtonDoubleClick(
const Point &mousePos) {}
65 virtual void mouseWheel(
const Point &mousePos,
bool wheelUp) {}
79 void leftButtonDown(
const Point &mousePos)
override { _pressed =
true; }
80 void middleButtonDown(
const Point &mousePos)
override { _pressed =
true; }
92 uint32 _priorFrameTime;
100 bool checkForNextFrameCounter();
106 return _eventTargets.top();
123 _eventTargets.push(target);
142 void pollEventsAndWait();
152 uint32 getTicksCount()
const;
157 uint32 getTotalPlayTicks()
const;
162 void setTotalPlayTicks(uint frames);
167 void sleep(uint time);
172 bool waitForPress(uint expiry);
187 bool isSpecialPressed(SpecialButtons btn)
const {
188 return (_specialButtons & btn) != 0;
Common::Point getMousePos() const
Definition: events.h:177
uint getSpecialButtons() const
Definition: events.h:194
uint32 getFrameCounter() const
Definition: events.h:147
virtual void mouseMove(const Point &mousePos)
Definition: events.h:58
void removeTarget()
Definition: events.h:129
virtual void onIdle()
Definition: events.h:53
void addTarget(CEventTarget *target)
Definition: events.h:122
Definition: keyboard.h:294
uint16 ascii
Definition: keyboard.h:310