mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 09:22:54 +08:00
General sorting improvements
This commit is contained in:
parent
6b3ecc28b8
commit
1cd93f79b3
@ -188,26 +188,18 @@ namespace osu.Game.Screens.Select
|
||||
public void Sort(FilterControl.SortMode mode) {
|
||||
switch (mode) {
|
||||
case FilterControl.SortMode.Artist:
|
||||
groups.Sort((x, y) =>
|
||||
{
|
||||
return string.Compare(x.BeatmapSet.Metadata.Artist, y.BeatmapSet.Metadata.Artist);
|
||||
});
|
||||
groups.Sort((x, y) => string.Compare(x.BeatmapSet.Metadata.Artist, y.BeatmapSet.Metadata.Artist));
|
||||
break;
|
||||
case FilterControl.SortMode.Title:
|
||||
groups.Sort((x, y) =>
|
||||
{
|
||||
return string.Compare(x.BeatmapSet.Metadata.Title, y.BeatmapSet.Metadata.Title);
|
||||
});
|
||||
groups.Sort((x, y) => string.Compare(x.BeatmapSet.Metadata.Title, y.BeatmapSet.Metadata.Title));
|
||||
break;
|
||||
case FilterControl.SortMode.Author:
|
||||
groups.Sort((x, y) =>
|
||||
{
|
||||
return string.Compare(x.BeatmapSet.Metadata.Author, y.BeatmapSet.Metadata.Author);
|
||||
});
|
||||
groups.Sort((x, y) => string.Compare(x.BeatmapSet.Metadata.Author, y.BeatmapSet.Metadata.Author));
|
||||
break;
|
||||
case FilterControl.SortMode.Difficulty:
|
||||
groups.Sort((x, y) =>
|
||||
{
|
||||
// TODO: replace with star rating once implemented
|
||||
if (x.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty >
|
||||
y.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty)
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user