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

@@ -59,7 +59,7 @@ namespace OpenRA.Mods.Cnc.Widgets
var installButton = panel.GetWidget<CncMenuButtonWidget>("INSTALL_BUTTON");
installButton.OnClick = () =>
Widget.OpenWindow("INSTALL_MUSIC_PANEL", new Dictionary<string, object>() {{ "afterInstall", afterInstall }});
Widget.OpenWindow("INSTALL_MUSIC_PANEL", new WidgetArgs() {{ "afterInstall", afterInstall }});
installButton.IsVisible = () => music.Length < 2; // Hack around ra shipping (only) hellmarch by default
panel.GetWidget("NO_MUSIC_LABEL").IsVisible = noMusic;