(375481a35) Write save times as unix time values and display them using the system's current date format

This commit is contained in:
Joonas Rikkonen
2019-05-16 07:03:15 +03:00
parent e42a0a33a4
commit d03e1995bc
12 changed files with 147 additions and 41 deletions
@@ -284,10 +284,15 @@ namespace Barotrauma
{
if (Font == null) return Vector2.Zero;
if (string.IsNullOrEmpty(text))
{
return Font.MeasureString(" ");
}
Vector2 size = Vector2.Zero;
while (size == Vector2.Zero)
{
try { size = Font.MeasureString((text == "") ? " " : text); }
try { size = Font.MeasureString(string.IsNullOrEmpty(text) ? " " : text); }
catch { text = text.Substring(0, text.Length - 1); }
}