hedgewars/uCommandHandlers.pas
changeset 5555 38e3d9347910
parent 5524 40b7f95d9f18
child 5577 272c82f82cee
child 5679 505c6448069b
equal deleted inserted replaced
5554:b27ed6c6f538 5555:38e3d9347910
    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