Changeset b8d4456 in opengl-game for game-gui-sdl.cpp


Ignore:
Timestamp:
Jun 8, 2020, 6:49:39 PM (4 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master
Children:
4e705d6
Parents:
4a9416a
Message:

Add x and y coordinates to mouse events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    r4a9416a rb8d4456  
    2727
    2828   if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
    29       return RTWO_ERROR;
    30    }
    31 
    32    int imgFlags = IMG_INIT_PNG;
    33    if (!(IMG_Init(imgFlags) & imgFlags)) {
    3429      return RTWO_ERROR;
    3530   }
     
    123118            break;
    124119         case SDL_MOUSEMOTION:
     120            event->mouse.x = e.motion.x;
     121            event->mouse.y = e.motion.y;
    125122         case SDL_FINGERMOTION:
    126123            event->type = UI_EVENT_MOUSEMOTION;
Note: See TracChangeset for help on using the changeset viewer.