relax items type for DropDownButtonLogic.ShowDropDown

This commit is contained in:
Chris Forbes
2011-10-30 09:55:32 +13:00
parent eaa4d06052
commit 7a6f4d3b04
6 changed files with 10 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ namespace OpenRA.Widgets
Widget.RootWidget.AddChild(panel);
}
public void ShowDropDown<T>(string panelTemplate, int height, List<T> options, Func<T, ScrollItemWidget, ScrollItemWidget> setupItem)
public void ShowDropDown<T>(string panelTemplate, int height, IEnumerable<T> options, Func<T, ScrollItemWidget, ScrollItemWidget> setupItem)
{
var substitutions = new Dictionary<string,int>() {{ "DROPDOWN_WIDTH", Bounds.Width }};
var panel = (ScrollPanelWidget)Widget.LoadWidget(panelTemplate, null, new WidgetArgs()