Split the colorpicker logic into its own handler. Game.LoadWidget no longer adds the loaded widget to the RootWidget.

This commit is contained in:
Paul Chote
2011-05-13 15:32:04 +12:00
parent 529ed51034
commit 21267688b0
4 changed files with 75 additions and 44 deletions

View File

@@ -113,14 +113,15 @@ namespace OpenRA
});
}
// Load a widget with world, orderManager, worldRenderer args, without adding it to the widget tree
public static Widget LoadWidget(World world, string widget, WidgetArgs args)
{
return Widget.LoadWidget(widget, new WidgetArgs(args)
return Game.modData.WidgetLoader.LoadWidget(new WidgetArgs(args)
{
{ "world", world },
{ "orderManager", orderManager },
{ "worldRenderer", worldRenderer },
});
}, null, widget);
}
static ActionQueue afterTickActions = new ActionQueue();