Use new mechanism for ra dropdowns

This commit is contained in:
Paul Chote
2011-05-22 16:57:22 +12:00
parent ab298e1eae
commit 078972e3be
6 changed files with 182 additions and 123 deletions

View File

@@ -333,8 +333,11 @@ namespace OpenRA.Mods.Cnc.Widgets
};
if (showBotOptions)
foreach (var bot in Rules.Info["player"].Traits.WithInterface<IBotInfo>().Select(t => t.Name))
foreach (var b in Rules.Info["player"].Traits.WithInterface<IBotInfo>().Select(t => t.Name))
{
var bot = b;
options.Add(new SlotDropDownOption("Bot: {0}".F(bot), "slot_bot {0} {1}".F(slot.Index, bot), () => slot.Bot == bot));
}
Func<SlotDropDownOption, ScrollItemWidget, ScrollItemWidget> setupItem = (o, itemTemplate) =>
{