restore closing hog speech quotation marks being added automatically (lost in SDL2 transition... I think)
authorsheepluva
Sun, 24 Apr 2016 22:10:37 +0200
changeset 11701 fa4bc078e509
parent 11700 3301d4d734a6
child 11702 446ce60700dd
restore closing hog speech quotation marks being added automatically (lost in SDL2 transition... I think)
hedgewars/uChat.pas
--- a/hedgewars/uChat.pas	Sun Apr 24 21:16:08 2016 +0200
+++ b/hedgewars/uChat.pas	Sun Apr 24 22:10:37 2016 +0200
@@ -1026,6 +1026,15 @@
         if byte(InputStr.s[0]) + l > 240 then exit;
         s[0]:= char(l);
         InsertIntoInputStr(s);
+
+        // add closing hog speech quotation marks automatically
+        if (l = 1) and (Length(InputStr.s) = 1) and charIsForHogSpeech(s[1]) then
+            begin
+            InsertIntoInputStr(s);
+            MoveCursorToPreviousChar();
+            UpdateCursorCoords();
+            end;
+
         end
 end;