Changeset 5a23277 in opengl-game
- Timestamp:
- Nov 12, 2019, 6:40:39 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- e3bef3a
- Parents:
- 0ae182f
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui-glfw.cpp
r0ae182f r5a23277 147 147 void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) { 148 148 UIEvent e; 149 e.type = UI_EVENT_KEY;149 e.type = action == GLFW_RELEASE ? UI_EVENT_KEYUP ? UI_EVENT_KEYDOWN; 150 150 e.key.keycode = key; 151 151 -
game-gui-sdl.cpp
r0ae182f r5a23277 101 101 } 102 102 break; 103 case SDL_KEYDOWN: 104 event->type = UI_EVENT_KEYDOWN; 105 event->key.keycode = e.key.keysym.scancode; 106 break; 103 107 case SDL_KEYUP: 104 case SDL_KEYDOWN: 105 event->type = UI_EVENT_KEY; 108 event->type = UI_EVENT_KEYUP; 106 109 event->key.keycode = e.key.keysym.scancode; 107 110 break; -
game-gui.hpp
r0ae182f r5a23277 15 15 UI_EVENT_WINDOW, 16 16 UI_EVENT_WINDOWRESIZE, 17 UI_EVENT_KEY, 17 UI_EVENT_KEYDOWN, 18 UI_EVENT_KEYUP, 18 19 UI_EVENT_MOUSEBUTTONDOWN, 19 20 UI_EVENT_MOUSEBUTTONUP, -
opengl-game.cpp
r0ae182f r5a23277 172 172 quit = true; 173 173 break; 174 case UI_EVENT_KEY :174 case UI_EVENT_KEYDOWN: 175 175 if (e.key.keycode == GLFW_KEY_ESCAPE) { 176 176 quit = true;
Note:
See TracChangeset
for help on using the changeset viewer.