hedgewars/uChat.pas
branchios-develop
changeset 13418 ba39a1d396c0
parent 13082 c213645ff848
child 13390 ec1491bb5acc
child 13462 b587cdb03bac
--- a/hedgewars/uChat.pas	Sun Jun 10 18:56:51 2018 +0200
+++ b/hedgewars/uChat.pas	Sun Jun 10 19:12:26 2018 +0200
@@ -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)