hedgewars/hwengine.pas
branchsdl2transition
changeset 9699 fab319c85a39
parent 9697 198c3ed28fe8
child 11338 7a7611adf715
--- a/hedgewars/hwengine.pas	Sun Nov 10 01:45:43 2013 +0400
+++ b/hedgewars/hwengine.pas	Sun Nov 10 14:04:15 2013 +0400
@@ -154,7 +154,9 @@
             case event.type_ of
 {$IFDEF SDL2}
                 SDL_KEYDOWN:
-                    if (GameState <> gsChat) and (GameState >= gsGame) then
+                    if (GameState = gsChat) then
+                        KeyPressChat(event.key.keysym.sym)
+                    else if (GameState >= gsGame) then
                         ProcessKey(event.key);
                 SDL_KEYUP:
                     if (GameState <> gsChat) and (GameState >= gsGame) then
@@ -172,8 +174,7 @@
                 SDL_MOUSEWHEEL:
                     ProcessMouseWheel(event.wheel.x, event.wheel.y);
 
-                SDL_TEXTINPUT: AddFileLog('[Text input] ' + event.text.text);
-                SDL_TEXTEDITING: AddFileLog('[Text edit] ''' + event.edit.text + ''' ' + inttostr(event.edit.start) + ' ' + inttostr(event.edit.length));
+                SDL_TEXTINPUT: uChat.TextInput(event.text);
 
                 SDL_WINDOWEVENT:
                     if event.window.event = SDL_WINDOWEVENT_SHOWN then