1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00
This commit is contained in:
DrabWeb 2017-05-26 03:10:36 -03:00
parent 28ee00109d
commit 5785715ad5
5 changed files with 8 additions and 10 deletions

View File

@ -137,7 +137,7 @@ namespace osu.Game.Overlays
private void withDisplayStyleControl(Action<DisplayStyleControl<RankStatus>> action)
{
var f = (Filter as FilterControl);
var f = Filter as FilterControl;
if (f != null) action.Invoke(f.DisplayStyleControl);
}

View File

@ -26,7 +26,7 @@ namespace osu.Game.Overlays.SearchableList
protected abstract T DefaultTab { get; }
protected virtual Drawable CreateSupplementaryControls() => null;
public SearchableListFilterControl()
protected SearchableListFilterControl()
{
if (!typeof(T).IsEnum)
throw new InvalidOperationException("BrowseFilterControl only supports enums as the generic type argument");

View File

@ -14,8 +14,6 @@ namespace osu.Game.Overlays.SearchableList
{
public abstract class SearchableListHeader<T> : Container
{
public static readonly float HEIGHT = 90;
private readonly Box tabStrip;
public readonly HeaderTabControl<T> Tabs;
@ -25,13 +23,13 @@ namespace osu.Game.Overlays.SearchableList
protected abstract T DefaultTab { get; }
protected abstract Drawable CreateHeaderText();
public SearchableListHeader()
protected SearchableListHeader()
{
if (!typeof(T).IsEnum)
throw new InvalidOperationException("BrowseHeader only supports enums as the generic type argument");
RelativeSizeAxes = Axes.X;
Height = HEIGHT;
Height = 90;
Children = new Drawable[]
{
@ -54,7 +52,7 @@ namespace osu.Game.Overlays.SearchableList
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10f, 0f),
Children = new Drawable[]
Children = new[]
{
new TextAwesome
{

View File

@ -30,7 +30,7 @@ namespace osu.Game.Overlays.SearchableList
protected abstract SearchableListHeader<T> CreateHeader();
protected abstract SearchableListFilterControl<U> CreateFilterControl();
public SearchableListOverlay()
protected SearchableListOverlay()
{
RelativeSizeAxes = Axes.Both;
@ -82,7 +82,7 @@ namespace osu.Game.Overlays.SearchableList
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING },
Padding = new MarginPadding { Horizontal = WIDTH_PADDING },
Direction = FillDirection.Vertical,
},
},

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays
get { return users; }
set
{
if (users == value) return;
if (users?.Equals(value) ?? false) return;
users = value;
panelFlow.Children = users.Select(u =>