Changeset 0ecab17 in opengl-game


Ignore:
Timestamp:
Apr 17, 2020, 2:54:05 AM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
a52ba87
Parents:
6d95ade
Message:

In GameGui_SDL, start setting a flag for key events to indicate repeated events

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    r6d95ade r0ecab17  
    107107            event->type = UI_EVENT_KEYDOWN;
    108108            event->key.keycode = e.key.keysym.scancode;
     109            event->key.repeat = e.key.repeat != 0;
    109110            break;
    110111         case SDL_KEYUP:
    111112            event->type = UI_EVENT_KEYUP;
    112113            event->key.keycode = e.key.keysym.scancode;
     114            event->key.repeat = e.key.repeat != 0;
    113115            break;
    114116         case SDL_MOUSEBUTTONDOWN:
     
    128130         case SDL_AUDIODEVICEREMOVED:
    129131         case SDL_TEXTINPUT:
    130          case SDL_TEXTEDITING: // TODO: Research this one later
     132         case SDL_TEXTEDITING:
    131133            event->type = UI_EVENT_UNKNOWN;
    132134            event->unknown.eventType = e.type;
  • game-gui.hpp

    r6d95ade r0ecab17  
    3030   EventType type;
    3131   unsigned int keycode;
     32   bool repeat;
    3233};
    3334
Note: See TracChangeset for help on using the changeset viewer.