hedgewars/uChat.pas
changeset 948 5d49a92c240a
parent 947 4e0c3ad89483
child 949 866729775535
equal deleted inserted replaced
947:4e0c3ad89483 948:5d49a92c240a
    23 procedure AddChatString(s: shortstring);
    23 procedure AddChatString(s: shortstring);
    24 procedure DrawChat;
    24 procedure DrawChat;
    25 procedure KeyPressChat(Key: Longword);
    25 procedure KeyPressChat(Key: Longword);
    26 
    26 
    27 implementation
    27 implementation
    28 uses uMisc, uStore, uConsts, SDLh, uConsole;
    28 uses uMisc, uStore, uConsts, SDLh, uConsole, uKeys;
    29 
    29 
    30 const MaxStrIndex = 7;
    30 const MaxStrIndex = 7;
    31 
    31 
    32 type TChatLine = record
    32 type TChatLine = record
    33 		s: shortstring;
    33 		s: shortstring;
   117 		8: if Length(InputStr.s) > 0 then
   117 		8: if Length(InputStr.s) > 0 then
   118 				begin
   118 				begin
   119 				InputStr.s[0]:= InputStrL[byte(InputStr.s[0])];
   119 				InputStr.s[0]:= InputStrL[byte(InputStr.s[0])];
   120 				SetLine(InputStr, InputStr.s)
   120 				SetLine(InputStr, InputStr.s)
   121 				end;
   121 				end;
   122 		13,271: begin
   122 		13, 271: begin
   123 			if Length(InputStr.s) > 0 then
   123 			if Length(InputStr.s) > 0 then
   124 				begin
   124 				begin
   125 				AddChatString(InputStr.s);
   125 				AddChatString(InputStr.s);
   126 				ParseCommand('/say ' + InputStr.s, true);
   126 				ParseCommand('/say ' + InputStr.s, true);
   127 				SetLine(InputStr, '');
   127 				SetLine(InputStr, '')
   128 				end;
   128 				end;
       
   129 			FreezeEnterKey;
   129 			GameState:= gsGame
   130 			GameState:= gsGame
   130 			end
   131 			end
   131 	else
   132 	else
   132 	if (Key < $80) then btw:= 1
   133 	if (Key < $80) then btw:= 1
   133 	else if (Key < $800) then btw:= 2
   134 	else if (Key < $800) then btw:= 2