From 74ed4cf0e373feeaf3bff56b25eacd9b3c97579e Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Fri, 19 May 2017 16:19:23 -0300 Subject: [PATCH] More cleanup --- osu.Game/Overlays/Direct/FilterControl.cs | 44 ++++++++++++----------- osu.Game/Overlays/Direct/Header.cs | 3 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/osu.Game/Overlays/Direct/FilterControl.cs b/osu.Game/Overlays/Direct/FilterControl.cs index 91372d7543..9f792d07ac 100644 --- a/osu.Game/Overlays/Direct/FilterControl.cs +++ b/osu.Game/Overlays/Direct/FilterControl.cs @@ -27,6 +27,8 @@ public class FilterControl : Container /// public static readonly float LOWER_HEIGHT = 21; + private const float padding = 10; + private readonly Box tabStrip; private readonly FillFlowContainer 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 { 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, + } } diff --git a/osu.Game/Overlays/Direct/Header.cs b/osu.Game/Overlays/Direct/Header.cs index af1dfb4b53..8e4ede48d5 100644 --- a/osu.Game/Overlays/Direct/Header.cs +++ b/osu.Game/Overlays/Direct/Header.cs @@ -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.OsuTabItem + private class DirectTabItem : OsuTabItem { public DirectTabItem(DirectTab value) : base(value) {