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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace OpenRA.Widgets
|
||||
public ILayout Layout;
|
||||
public int MinimumThumbSize = 10;
|
||||
public ScrollPanelAlign Align = ScrollPanelAlign.Top;
|
||||
public bool CollapseHiddenChildren = false;
|
||||
protected float ListOffset = 0;
|
||||
protected bool UpPressed = false;
|
||||
protected bool DownPressed = false;
|
||||
|
||||
Reference in New Issue
Block a user