Patch widget loader to convert @key into Id member of widgets

This commit is contained in:
Chris Forbes
2012-03-13 09:21:01 +13:00
parent dbd09ea843
commit b9eb3a0ad0

View File

@@ -48,6 +48,9 @@ namespace OpenRA
if (parent != null)
parent.AddChild( widget );
if (node.Key.Contains("@"))
FieldLoader.LoadField(widget, "Id", node.Key.Split('@')[1]);
foreach (var child in node.Value.Nodes)
if (child.Key != "Children")
FieldLoader.LoadField(widget, child.Key, child.Value.Value);