hedgewars/uChat.pas
branchwebgl
changeset 9521 8054d9d775fd
parent 9160 fc46e75f6b72
parent 9319 492a0ad67e33
child 9950 2759212a27de
--- a/hedgewars/uChat.pas	Fri Oct 11 11:55:31 2013 +0200
+++ b/hedgewars/uChat.pas	Fri Oct 11 17:43:13 2013 +0200
@@ -58,13 +58,13 @@
 
 const
     colors: array[#0..#6] of TSDL_Color = (
-            (r:$FF; g:$FF; b:$FF; unused:$FF), // unused, feel free to take it for anything
-            (r:$FF; g:$FF; b:$FF; unused:$FF), // chat message [White]
-            (r:$FF; g:$00; b:$FF; unused:$FF), // action message [Purple]
-            (r:$90; g:$FF; b:$90; unused:$FF), // join/leave message [Lime]
-            (r:$FF; g:$FF; b:$A0; unused:$FF), // team message [Light Yellow]
-            (r:$FF; g:$00; b:$00; unused:$FF), // error messages [Red]
-            (r:$00; g:$FF; b:$FF; unused:$FF)  // input line [Light Blue]
+            (r:$FF; g:$FF; b:$FF; a:$FF), // unused, feel free to take it for anything
+            (r:$FF; g:$FF; b:$FF; a:$FF), // chat message [White]
+            (r:$FF; g:$00; b:$FF; a:$FF), // action message [Purple]
+            (r:$90; g:$FF; b:$90; a:$FF), // join/leave message [Lime]
+            (r:$FF; g:$FF; b:$A0; a:$FF), // team message [Light Yellow]
+            (r:$FF; g:$00; b:$00; a:$FF), // error messages [Red]
+            (r:$00; g:$FF; b:$FF; a:$FF)  // input line [Light Blue]
             );
     ChatCommandz: array [TChatCmd] of record
             ChatCmd: string[31];
@@ -298,7 +298,9 @@
 begin
     FreezeEnterKey;
     history:= 0;
+{$IFNDEF SDL2}
     SDL_EnableKeyRepeat(0,0);
+{$ENDIF}
     GameState:= gsGame;
     ResetKbd;
 end;
@@ -325,7 +327,7 @@
                 SetLine(InputStr, '', true)
             else CleanupInput
             end;
-        SDLK_RETURN:
+        SDLK_RETURN, SDLK_KP_ENTER:
             begin
             if Length(InputStr.s) > 0 then
                 begin
@@ -421,7 +423,9 @@
 begin
     s:= s; // avoid compiler hint
     GameState:= gsChat;
+{$IFNDEF SDL2}
     SDL_EnableKeyRepeat(200,45);
+{$ENDIF}
     if length(s) = 0 then
         SetLine(InputStr, '', true)
     else