Add filters to the replay browser dialog

This closes issue #2152. The filters added are:

* Game type (singleplayer / multiplayer)
* Date
* Duration
* Outcome
* Player name

Other changes:

* Added a 'CollapseHiddenChildren' option to the ScrollPanelWidget to
make hidden children take up no space.
* Removed the extension (.rep) from the replay filenames in the
replay browser.
This commit is contained in:
Pavlos Touboulidis
2014-04-28 18:12:39 +03:00
parent 98a05b61b3
commit a80c4f086a
5 changed files with 454 additions and 57 deletions

View File

@@ -22,7 +22,8 @@ namespace OpenRA.Widgets
widget.ContentHeight = widget.ItemSpacing;
w.Bounds.Y = widget.ContentHeight;
widget.ContentHeight += w.Bounds.Height + widget.ItemSpacing;
if (!widget.CollapseHiddenChildren || w.IsVisible())
widget.ContentHeight += w.Bounds.Height + widget.ItemSpacing;
}
public void AdjustChildren()
@@ -31,7 +32,8 @@ namespace OpenRA.Widgets
foreach (var w in widget.Children)
{
w.Bounds.Y = widget.ContentHeight;
widget.ContentHeight += w.Bounds.Height + widget.ItemSpacing;
if (!widget.CollapseHiddenChildren || w.IsVisible())
widget.ContentHeight += w.Bounds.Height + widget.ItemSpacing;
}
}
}