update player list in lobby gracefully for better user experience

This commit is contained in:
Sascha Biedermann
2013-03-18 22:25:31 +01:00
parent 1fb2796ada
commit 770d79da0b
4 changed files with 69 additions and 11 deletions

View File

@@ -24,5 +24,16 @@ namespace OpenRA.Widgets
w.Bounds.Y += widget.ContentHeight;
widget.ContentHeight += w.Bounds.Height + widget.ItemSpacing;
}
public void AdjustChildren()
{
widget.ContentHeight = widget.ItemSpacing;
foreach (var w in widget.Children)
{
w.Bounds.Y = widget.ContentHeight;
widget.ContentHeight += w.Bounds.Height + widget.ItemSpacing;
}
}
}
}