Add a WidgetArgs type to work around gmcs not understanding lambda -> Action -> object.

This commit is contained in:
Paul Chote
2011-05-13 09:41:21 +12:00
parent 603379aa96
commit f4ea4c5daa
17 changed files with 85 additions and 79 deletions

View File

@@ -38,10 +38,10 @@ namespace OpenRA.Mods.Cnc.Widgets
panel.GetWidget<CncMenuButtonWidget>("MAP_BUTTON").OnClick = () =>
{
Widget.OpenWindow( "MAPCHOOSER_PANEL", new Dictionary<string, object>
Widget.OpenWindow( "MAPCHOOSER_PANEL", new WidgetArgs()
{
{ "initialMap", map.Uid },
{ "onExit", new Action(() => {}) },
{ "onExit", () => {} },
{ "onSelect", new Action<Map>(m => map = m) }
});
};