create widgets on demand

This commit is contained in:
Bob
2010-09-21 00:01:44 +12:00
parent f4699132d6
commit 3165ec5359
19 changed files with 1808 additions and 1797 deletions

View File

@@ -17,10 +17,10 @@ namespace OpenRA.Widgets.Delegates
public class MapChooserDelegate : IWidgetDelegate
{
MapStub Map = null;
public MapChooserDelegate()
[ObjectCreator.UseCtor]
public MapChooserDelegate( [ObjectCreator.Param( "widget" )] Widget bg )
{
var r = Widget.RootWidget;
var bg = r.GetWidget("MAP_CHOOSER");
bg.SpecialOneArg = (map) => RefreshMapList(map);
var ml = bg.GetWidget<ListBoxWidget>("MAP_LIST");