1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

fixup! Filter doesn't need to be public, nor have a property.

This commit is contained in:
Dean Herbert 2017-03-16 14:23:48 +09:00
parent 269c1a5e5c
commit da6b98db10
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
3 changed files with 18 additions and 12 deletions

View File

@ -40,10 +40,10 @@ namespace osu.Desktop.VisualTests.Tests
Add(songSelect = new PlaySongSelect());
AddButton(@"Sort by Artist", delegate { songSelect.Filter.Sort = SortMode.Artist; });
AddButton(@"Sort by Title", delegate { songSelect.Filter.Sort = SortMode.Title; });
AddButton(@"Sort by Author", delegate { songSelect.Filter.Sort = SortMode.Author; });
AddButton(@"Sort by Difficulty", delegate { songSelect.Filter.Sort = SortMode.Difficulty; });
AddButton(@"Sort by Artist", delegate { songSelect.FilterControl.Sort = SortMode.Artist; });
AddButton(@"Sort by Title", delegate { songSelect.FilterControl.Sort = SortMode.Title; });
AddButton(@"Sort by Author", delegate { songSelect.FilterControl.Sort = SortMode.Author; });
AddButton(@"Sort by Difficulty", delegate { songSelect.FilterControl.Sort = SortMode.Difficulty; });
}
protected override void Dispose(bool isDisposing)

View File

@ -15,6 +15,7 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Screens.Select.Filter;
using Container = osu.Framework.Graphics.Containers.Container;
using osu.Framework.Graphics.UserInterface.Tab;
using osu.Framework.Input;
namespace osu.Game.Screens.Select
{
@ -167,5 +168,10 @@ namespace osu.Game.Screens.Select
{
sortTabs.AccentColour = spriteText.Colour = colours.GreenLight;
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{
return true;
}
}
}

View File

@ -65,7 +65,7 @@ namespace osu.Game.Screens.Select
/// </summary>
protected readonly Footer Footer;
private FilterControl filterControl;
public readonly FilterControl FilterControl;
protected SongSelect()
{
@ -94,7 +94,7 @@ namespace osu.Game.Screens.Select
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
});
Add(filterControl = new FilterControl(filter_height)
Add(FilterControl = new FilterControl(filter_height)
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
@ -183,9 +183,9 @@ namespace osu.Game.Screens.Select
filterTask = Scheduler.AddDelayed(() =>
{
filterTask = null;
var search = filterControl.Search;
var search = FilterControl.Search;
BeatmapGroup newSelection = null;
carousel.Sort(filterControl.Sort);
carousel.Sort(FilterControl.Sort);
foreach (var beatmapGroup in carousel)
{
var set = beatmapGroup.BeatmapSet;
@ -242,7 +242,7 @@ namespace osu.Game.Screens.Select
beatmapInfoWedge.State = Visibility.Visible;
filterControl.Activate();
FilterControl.Activate();
}
protected override void OnResuming(Screen last)
@ -255,7 +255,7 @@ namespace osu.Game.Screens.Select
Content.ScaleTo(1, 250, EasingTypes.OutSine);
filterControl.Activate();
FilterControl.Activate();
}
protected override void OnSuspending(Screen next)
@ -264,7 +264,7 @@ namespace osu.Game.Screens.Select
Content.FadeOut(250);
filterControl.Deactivate();
FilterControl.Deactivate();
base.OnSuspending(next);
}
@ -274,7 +274,7 @@ namespace osu.Game.Screens.Select
Content.FadeOut(100);
filterControl.Deactivate();
FilterControl.Deactivate();
return base.OnExiting(next);
}