Speech bubbles: Fix word-wrapping being used between interpunction
authorWuzzy <Wuzzy2@mail.ru>
Sat, 01 Jun 2019 00:27:23 +0200
changeset 15097 ba9d54d1c25d
parent 15096 5c8c729a16ce
child 15098 8cb1eebee4a0
Speech bubbles: Fix word-wrapping being used between interpunction
hedgewars/uRenderUtils.pas
--- a/hedgewars/uRenderUtils.pas	Fri May 31 21:39:47 2019 +0200
+++ b/hedgewars/uRenderUtils.pas	Sat Jun 01 00:27:23 2019 +0200
@@ -414,7 +414,7 @@
     finalSurface, tmpsurf, rotatedEdge: PSDL_Surface;
     rect: TSDL_Rect;
     {$IFNDEF PAS2C}
-    chars: set of char = [#9,' ',';',':','?','!',','];
+    breakChars: set of char = [#9,' ','-'];
     {$ENDIF}
     substr: ansistring;
     edge, corner, tail: TSPrite;
@@ -464,7 +464,7 @@
         w:= 0;
         i:= round(Sqrt(length(s)) * 2);
         {$IFNDEF PAS2C}
-        s:= WrapText(s, #1, chars, i);
+        s:= WrapText(s, #1, breakChars, i);
         {$ENDIF}
         pos:= 1; line:= 0;
     // Find the longest line for the purposes of centring the text.  Font dependant.