hedgewars/uChat.pas
changeset 13082 c213645ff848
parent 12851 e5c461729fe3
child 13390 ec1491bb5acc
child 13462 b587cdb03bac
--- a/hedgewars/uChat.pas	Fri Mar 02 19:44:09 2018 +0100
+++ b/hedgewars/uChat.pas	Sun Mar 04 00:13:38 2018 +0100
@@ -303,7 +303,7 @@
 top := 10 + visibleCount * ClHeight; // we start with input line (if any)
 
 // draw chat input line first and under all other lines
-if (GameState = gsChat) and (InputStr.Tex <> nil) then
+if isInChatMode and (InputStr.Tex <> nil) then
     begin
 
     if InputLinePrefix.Tex = nil then
@@ -575,7 +575,7 @@
     history:= 0;
     SDL_StopTextInput();
     //SDL_EnableKeyRepeat(0,0);
-    GameState:= gsGame;
+    isInChatMode:= false;
     ResetKbd;
 end;
 
@@ -1101,7 +1101,7 @@
 var i: Integer;
 begin
     s:= s; // avoid compiler hint
-    GameState:= gsChat;
+    isInChatMode:= true;
     SDL_StopTextInput();
     SDL_StartTextInput();
     //Make REALLY sure unexpected events are flushed (1 time is insufficient as of SDL 2.0.7)