(c45394988) Refactor and fix button interaction and access checks in the indoors steering manager.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:40:00 +03:00
parent 704e0731c9
commit ddd84a4f9e
82 changed files with 1867 additions and 1608 deletions
@@ -107,42 +107,24 @@ namespace Barotrauma
text = text.Replace("\n", " \n ");
List<string> words = new List<string>();
string currWord = "";
for (int i = 0; i < text.Length; i++)
string[] words;
if (TextManager.NoWhiteSpace)
{
if (isCJK.IsMatch(text[i].ToString()))
words = new string[text.Length];
for (int i = 0; i < text.Length; i++)
{
if (currWord.Length > 0)
{
words.Add(currWord);
currWord = "";
}
words.Add(text[i].ToString());
}
else if (text[i] == ' ')
{
if (currWord.Length > 0)
{
words.Add(currWord);
currWord = "";
}
}
else
{
currWord += text[i];
words[i] = text[i].ToString();
}
}
if (currWord.Length > 0)
else
{
words.Add(currWord);
currWord = "";
words = text.Split(' ');
}
StringBuilder wrappedText = new StringBuilder();
float linePos = 0f;
Vector2 spaceSize = font.MeasureString(" ") * textScale;
for (int i = 0; i < words.Count; ++i)
for (int i = 0; i < words.Length; ++i)
{
if (words[i].Length == 0)
{