Changeset 5a23277 in opengl-game for game-gui-glfw.cpp


Ignore:
Timestamp:
Nov 12, 2019, 6:40:39 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
e3bef3a
Parents:
0ae182f
Message:

Replace the key event in game-gui with distinct key up and key down events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-glfw.cpp

    r0ae182f r5a23277  
    147147void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {
    148148   UIEvent e;
    149    e.type = UI_EVENT_KEY;
     149   e.type = action == GLFW_RELEASE ? UI_EVENT_KEYUP ? UI_EVENT_KEYDOWN;
    150150   e.key.keycode = key;
    151151
Note: See TracChangeset for help on using the changeset viewer.