mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Implemented sorting in TestCasePlaySong
This commit is contained in:
@ -199,13 +199,12 @@ namespace osu.Game.Screens.Select
|
||||
case FilterControl.SortMode.Difficulty:
|
||||
groups.Sort((x, y) =>
|
||||
{
|
||||
// TODO: replace with star rating once implemented
|
||||
/*TODO: replace with star rating once implemented
|
||||
* Assumes BeatmapSets not to be grouped - or to be by difficulty,
|
||||
* otherwise this sorting makes little sense - or does it? */
|
||||
if (x.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty >
|
||||
y.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty)
|
||||
return 1;
|
||||
else if (Equals(x.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty,
|
||||
y.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty))
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
});
|
||||
|
@ -21,7 +21,15 @@ namespace osu.Game.Screens.Select
|
||||
public Action FilterChanged;
|
||||
|
||||
public string Search => searchTextBox.Text;
|
||||
public SortMode Sort { get; private set; } = SortMode.Title;
|
||||
private SortMode sort = SortMode.Title;
|
||||
public SortMode Sort {
|
||||
get { return sort; }
|
||||
set {
|
||||
sort = value;
|
||||
FilterChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public Action Exit;
|
||||
|
||||
private SearchTextBox searchTextBox;
|
||||
|
@ -54,8 +54,12 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private Footer footer;
|
||||
|
||||
private FilterControl filter;
|
||||
public FilterControl Filter {
|
||||
get; private set;
|
||||
}
|
||||
|
||||
Player player;
|
||||
FilterControl filter;
|
||||
|
||||
private void start()
|
||||
{
|
||||
|
Reference in New Issue
Block a user