relax items type for DropDownButtonLogic.ShowDropDown
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user