hedgewars/uCommandHandlers.pas
branchhedgeroid
changeset 5577 272c82f82cee
parent 5530 25d4118056e1
parent 5555 38e3d9347910
child 5725 e27100a0e2d0
equal deleted inserted replaced
5550:50650032c251 5577:272c82f82cee
    41 
    41 
    42 procedure chQuit(var s: shortstring);
    42 procedure chQuit(var s: shortstring);
    43 const prevGState: TGameState = gsConfirm;
    43 const prevGState: TGameState = gsConfirm;
    44 begin
    44 begin
    45     s:= s; // avoid compiler hint
    45     s:= s; // avoid compiler hint
    46     if GameState <> gsConfirm then
    46     if (GameState = gsGame) or (GameState = gsChat) then
    47     begin
    47         begin
    48         prevGState:= GameState;
    48         prevGState:= GameState;
    49         GameState:= gsConfirm;
    49         GameState:= gsConfirm;
    50         SDL_ShowCursor(1)
    50         SDL_ShowCursor(1)
    51     end else
    51         end else
    52     begin
    52         if GameState = gsConfirm then
    53         GameState:= prevGState;
    53             begin
    54         SDL_ShowCursor(ord(isPaused))
    54             GameState:= prevGState;
    55     end
    55             SDL_ShowCursor(ord(isPaused))
       
    56             end
    56 end;
    57 end;
    57 
    58 
    58 procedure chForceQuit(var s: shortstring);
    59 procedure chForceQuit(var s: shortstring);
    59 begin
    60 begin
    60     s:= s; // avoid compiler hint
    61     s:= s; // avoid compiler hint