Changeset f6521fb in opengl-game for game-gui.hpp
- Timestamp:
- Sep 13, 2019, 1:30:24 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- c61323a
- Parents:
- 203ab1b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui.hpp
r203ab1b rf6521fb 5 5 #include <vector> 6 6 7 // TODO: Remove the line below once the couts in the game-gui-* files are moved 8 #include <iostream> 9 7 10 #ifdef GAMEGUI_INCLUDE_VULKAN 8 11 #include <vulkan/vulkan.h> 9 12 #endif 10 13 11 // TODO: Remove the line below once the couts in the game-gui-* files are moved 12 #include <iostream> 14 using namespace std; 13 15 14 using namespace std; 16 enum EventType { 17 UI_EVENT_QUIT, 18 UI_EVENT_WINDOW, 19 UI_EVENT_KEY, 20 UI_EVENT_MOUSEBUTTONDOWN, 21 UI_EVENT_MOUSEBUTTONUP, 22 UI_EVENT_MOUSEMOTION 23 }; 24 25 struct WindowEvent { 26 EventType type; 27 }; 28 29 struct KeyEvent { 30 EventType type; 31 unsigned int keycode; 32 }; 33 34 struct MouseEvent { 35 EventType type; 36 }; 37 38 union UIEvent { 39 EventType type; 40 WindowEvent window; 41 KeyEvent key; 42 MouseEvent mouse; 43 }; 15 44 16 45 /* … … 35 64 virtual void destroyWindow() = 0; 36 65 66 virtual void processEvents() = 0; 67 virtual int pollEvent(UIEvent* event) = 0; 68 37 69 /* 38 70 virtual void processEvents() = 0;
Note:
See TracChangeset
for help on using the changeset viewer.