hedgewars/hwengine.pas
branchsdl2transition
changeset 9694 e8d0fe885169
parent 9686 352393fc75be
child 9697 198c3ed28fe8
equal deleted inserted replaced
9691:a312103af4b1 9694:e8d0fe885169
   163                         if GameState >= gsGame then ProcessKey(event.key);
   163                         if GameState >= gsGame then ProcessKey(event.key);
   164                 SDL_KEYUP:
   164                 SDL_KEYUP:
   165                     if (GameState <> gsChat) and (GameState >= gsGame) then
   165                     if (GameState <> gsChat) and (GameState >= gsGame) then
   166                         ProcessKey(event.key);
   166                         ProcessKey(event.key);
   167 
   167 
       
   168                 SDL_MOUSEBUTTONDOWN:
       
   169                     if GameState = gsConfirm then
       
   170                         ParseCommand('quit', true)
       
   171                     else
       
   172                         if (GameState >= gsGame) then ProcessMouse(event.button, true);
       
   173 
       
   174                 SDL_MOUSEBUTTONUP:
       
   175                     if (GameState >= gsGame) then ProcessMouse(event.button, false);
       
   176 
       
   177                 SDL_MOUSEWHEEL:
       
   178                     ProcessMouseWheel(event.wheel.x, event.wheel.y);
       
   179 
   168                 SDL_WINDOWEVENT:
   180                 SDL_WINDOWEVENT:
   169                     if event.window.event = SDL_WINDOWEVENT_SHOWN then
   181                     if event.window.event = SDL_WINDOWEVENT_SHOWN then
   170                     begin
   182                     begin
   171                         cHasFocus:= true;
   183                         cHasFocus:= true;
   172                         onFocusStateChanged()
   184                         onFocusStateChanged()