DEADSOFTWARE

added word wrap to center messages; fixed e_CharFont_GetSizeFmt
[d2df-sdl.git] / src / game / g_basic.pas
index eba4094cb147133a49a42269fc4da56cb5b63287..e5ef3d9c28acdff92c10e22ddf19ef8beb635e92 100644 (file)
@@ -89,7 +89,7 @@ function g_SetFileTime(fileName: String; time: Integer): Boolean;
 procedure SortSArray(var S: SSArray);
 function b_Text_Format(S: string): string;
 function b_Text_Unformat(S: string): string;
-
+function b_Text_Wrap(S: string; LineLen: Integer): string;
 
 var
   gmon_dbg_los_enabled: Boolean = true;
@@ -1175,4 +1175,9 @@ begin
   end;
 end;
 
+function b_Text_Wrap(S: string; LineLen: Integer): string;
+begin
+  Result := WrapText(S, ''#10, [#10, ' ', '-'], LineLen);
+end;
+
 end.