Use the same mechanism for loading ingame and shellmap ui.

This commit is contained in:
Paul Chote
2011-05-08 21:23:01 +12:00
parent 07d5f91325
commit d95138b600
6 changed files with 41 additions and 11 deletions

View File

@@ -112,6 +112,16 @@ namespace OpenRA
{ "worldRenderer", worldRenderer },
});
}
public static Widget LoadWidget(World world, string widget, Dictionary<string, object> args)
{
return Widget.LoadWidget(widget, new Dictionary<string,object>(args)
{
{ "world", world },
{ "orderManager", orderManager },
{ "worldRenderer", worldRenderer },
});
}
static ActionQueue afterTickActions = new ActionQueue();
public static void RunAfterTick(Action a) { afterTickActions.Add(a); }