ScummVM API documentation
events.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 #ifndef TOT_EVENTS_H
22 #define TOT_EVENTS_H
23 
24 #include "common/events.h"
25 #include "common/scummsys.h"
26 
27 namespace Tot {
28 
29 enum GAME_KEY {
30  KEY_TALK = 0,
31  KEY_PICKUP = 1,
32  KEY_LOOKAT = 2,
33  KEY_USE = 3,
34  KEY_OPEN = 4,
35  KEY_CLOSE = 5,
36  KEY_YES = 6,
37  KEY_NO = 7,
38  KEY_SAVELOAD = 8,
39  KEY_VOLUME = 9,
40  KEY_ESCAPE = 10,
41  KEY_NONE = -1
42 };
43 
45 private:
46  Common::Event _event;
47 
48  void handleKey(const Common::Event &event);
49 public:
50  bool _escKeyFl = false;
51  bool _keyPressed = false;
52  GAME_KEY _gameKey = KEY_NONE;
53  bool _leftMouseButton = 0;
54  bool _rightMouseButton = 0;
55  int16 _mouseX = 0;
56  int16 _mouseY = 0;
57  Common::Event _lastKeyEvent;
58 
60 
61  void pollEvent(bool allowDrag = false);
62  void zeroEvents(bool allowDrag = false);
63  void waitForPress();
64 
65 };
66 
67 } // End of namespace Tot
68 #endif
Definition: events.h:210
Definition: anims.h:26
Definition: events.h:44