# HG changeset patch # User koda # Date 1363474250 -3600 # Node ID 42892d1fb9e12edb8593fcb6193a2e3ef7063dff # Parent ecb0a97100cf2dfa10fc58cebed6a6f43d9374ed formatting diff -r ecb0a97100cf -r 42892d1fb9e1 hedgewars/uChat.pas --- a/hedgewars/uChat.pas Sat Mar 16 23:29:50 2013 +0100 +++ b/hedgewars/uChat.pas Sat Mar 16 23:50:50 2013 +0100 @@ -296,7 +296,7 @@ var i, btw: integer; utf8: shortstring; begin -if Key <> 0 then + if Key <> 0 then case Key of {Backspace} 8, 127: if Length(InputStr.s) > 0 then @@ -325,32 +325,32 @@ GameState:= gsGame; ResetKbd; end; - else - if (Key < $80) then - btw:= 1 - else if (Key < $800) then - btw:= 2 - else if (Key < $10000) then - btw:= 3 else - btw:= 4; + if (Key < $80) then + btw:= 1 + else if (Key < $800) then + btw:= 2 + else if (Key < $10000) then + btw:= 3 + else + btw:= 4; - utf8:= ''; + utf8:= ''; - for i:= btw downto 2 do - begin - utf8:= char((Key or $80) and $BF) + utf8; - Key:= Key shr 6 - end; + for i:= btw downto 2 do + begin + utf8:= char((Key or $80) and $BF) + utf8; + Key:= Key shr 6 + end; - utf8:= char(Key or firstByteMark[Pred(btw)]) + utf8; + utf8:= char(Key or firstByteMark[Pred(btw)]) + utf8; - if byte(InputStr.s[0]) + btw > 240 then - exit; + if byte(InputStr.s[0]) + btw > 240 then + exit; - InputStrL[byte(InputStr.s[0]) + btw]:= InputStr.s[0]; - SetLine(InputStr, InputStr.s + utf8, true) - end + InputStrL[byte(InputStr.s[0]) + btw]:= InputStr.s[0]; + SetLine(InputStr, InputStr.s + utf8, true) + end end; procedure chChatMessage(var s: shortstring);