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

@@ -122,12 +122,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
void ShowDropDown(Player p, DropDownButtonWidget dropdown)
{
var stances = Enum.GetValues(typeof(Stance)).OfType<Stance>().ToList();
var stances = Enum.GetValues(typeof(Stance)).OfType<Stance>();
Func<Stance, ScrollItemWidget, ScrollItemWidget> setupItem = (s, template) =>
{
var item = ScrollItemWidget.Setup(template,
() => s == world.LocalPlayer.Stances[ p ],
() => SetStance(dropdown, p, s));
() => s == world.LocalPlayer.Stances[ p ],
() => SetStance(dropdown, p, s));
item.GetWidget<LabelWidget>("LABEL").GetText = () => s.ToString();
return item;
@@ -141,8 +141,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
if (p.World.LobbyInfo.GlobalSettings.LockTeams)
return; // team changes are banned
world.IssueOrder(new Order("SetStance", world.LocalPlayer.PlayerActor,
false) { TargetLocation = new int2((int)ss, 0), TargetString = p.InternalName });
world.IssueOrder(new Order("SetStance", world.LocalPlayer.PlayerActor, false)
{ TargetLocation = new int2((int)ss, 0), TargetString = p.InternalName });
bw.Text = ss.ToString();
}