Set orders stay in CrewCommander interface after reopening, minor changes to the interface layout

This commit is contained in:
Regalis
2015-12-17 19:35:14 +02:00
parent fa5cceb903
commit eb0e08c8ee
9 changed files with 107 additions and 451 deletions

View File

@@ -76,11 +76,23 @@ namespace Barotrauma
Color = new Color(ToolBox.GetAttributeVector4(orderElement, "color", new Vector4(1.0f, 1.0f, 1.0f, 1.0f)));
Options = ToolBox.GetAttributeString(orderElement, "options", "").Split(',');
for (int i = 0; i<Options.Length; i++)
string optionStr = ToolBox.GetAttributeString(orderElement, "options", "");
if (string.IsNullOrWhiteSpace(optionStr))
{
Options[i] = Options[i].Trim();
Options = new string[0];
}
else
{
Options = optionStr.Split(',');
for (int i = 0; i<Options.Length; i++)
{
Options[i] = Options[i].Trim();
}
}
foreach (XElement subElement in orderElement.Elements())
{