Patch widget loader to convert @key into Id member of widgets
This commit is contained in:
@@ -48,6 +48,9 @@ namespace OpenRA
|
|||||||
if (parent != null)
|
if (parent != null)
|
||||||
parent.AddChild( widget );
|
parent.AddChild( widget );
|
||||||
|
|
||||||
|
if (node.Key.Contains("@"))
|
||||||
|
FieldLoader.LoadField(widget, "Id", node.Key.Split('@')[1]);
|
||||||
|
|
||||||
foreach (var child in node.Value.Nodes)
|
foreach (var child in node.Value.Nodes)
|
||||||
if (child.Key != "Children")
|
if (child.Key != "Children")
|
||||||
FieldLoader.LoadField(widget, child.Key, child.Value.Value);
|
FieldLoader.LoadField(widget, child.Key, child.Value.Value);
|
||||||
|
|||||||
Reference in New Issue
Block a user