More cleanup

This commit is contained in:
DrabWeb 2017-05-19 16:19:23 -03:00
parent 6eac19e76b
commit 74ed4cf0e3
2 changed files with 24 additions and 23 deletions

View File

@ -27,6 +27,8 @@ public class FilterControl : Container
/// </summary>
public static readonly float LOWER_HEIGHT = 21;
private const float padding = 10;
private readonly Box tabStrip;
private readonly FillFlowContainer<RulesetToggleButton> modeButtons;
private FillFlowContainer resultCountsContainer;
@ -68,18 +70,19 @@ public FilterControl()
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Left = DirectOverlay.WIDTH_PADDING, Right = DirectOverlay.WIDTH_PADDING, Top = 10 },
Padding = new MarginPadding { Left = DirectOverlay.WIDTH_PADDING, Right = DirectOverlay.WIDTH_PADDING },
Children = new Drawable[]
{
Search = new DirectSearchTextBox
{
RelativeSizeAxes = Axes.X,
Margin = new MarginPadding { Top = padding },
},
modeButtons = new FillFlowContainer<RulesetToggleButton>
{
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(10f, 0f),
Margin = new MarginPadding { Top = 10f },
Spacing = new Vector2(padding, 0f),
Margin = new MarginPadding { Top = padding },
},
SortTabs = new SortTabControl
{
@ -118,7 +121,6 @@ public FilterControl()
},
};
//todo: possibly restore from config
RankStatusDropdown.Current.Value = RankStatus.RankedApproved;
SortTabs.Current.Value = SortCriteria.Title;
SortTabs.Current.TriggerChange();
@ -250,28 +252,12 @@ public SlimMenu()
}
}
public enum RankStatus
{
Any,
[Description("Ranked & Approved")]
RankedApproved,
Approved,
Loved,
Favourites,
[Description("Mod Requests")]
ModRequests,
Pending,
Graveyard,
[Description("My Maps")]
MyMaps,
}
public class ResultCounts
{
public readonly int Artists;
public readonly int Songs;
public readonly int Tags;
public ResultCounts(int artists, int songs, int tags)
{
Artists = artists;
@ -279,4 +265,20 @@ public ResultCounts(int artists, int songs, int tags)
Tags = tags;
}
}
public enum RankStatus
{
Any,
[Description("Ranked & Approved")]
RankedApproved,
Approved,
Loved,
Favourites,
[Description("Mod Requests")]
ModRequests,
Pending,
Graveyard,
[Description("My Maps")]
MyMaps,
}
}

View File

@ -81,7 +81,6 @@ public Header()
},
};
//todo: possibly restore from config instead
Tabs.Current.Value = DirectTab.Search;
Tabs.Current.TriggerChange();
}
@ -102,7 +101,7 @@ public DirectTabControl()
AccentColour = Color4.White;
}
private class DirectTabItem : OsuTabControl<DirectTab>.OsuTabItem
private class DirectTabItem : OsuTabItem
{
public DirectTabItem(DirectTab value) : base(value)
{