refactored a bit - something is still failing
This commit is contained in:
@@ -36,6 +36,7 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
Players.Children.Clear();
|
||||
int i = 0;
|
||||
|
||||
foreach(var client in Game.LobbyInfo.Clients)
|
||||
{
|
||||
//HACK : "the c# spec is, IMHO, broken here"
|
||||
@@ -43,9 +44,12 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
Log.Write("Client {0}",c.Name);
|
||||
var template = PlayerTemplate.Clone();
|
||||
var pos = template.DrawPosition();
|
||||
|
||||
template.Id = "PLAYER_{0}".F(c.Index);
|
||||
template.Parent = Players;
|
||||
template.GetWidget<ButtonWidget>("NAME").GetText = () => {return c.Name; };
|
||||
template.Bounds = new Rectangle(template.Bounds.X, template.Bounds.Y + i, template.Bounds.Width, template.Bounds.Height);
|
||||
template.Bounds = new Rectangle(pos.X, pos.Y + i, template.Bounds.Width, template.Bounds.Height);
|
||||
template.IsVisible = () => {return true;};
|
||||
Players.AddChild(template);
|
||||
i += 30;
|
||||
|
||||
Reference in New Issue
Block a user