mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:02:53 +08:00
Add ability to sort by source in song select
This commit is contained in:
parent
2bcf1ed306
commit
8964d51de9
@ -304,6 +304,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
AddStep(@"Sort by BPM", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.BPM));
|
||||
AddStep(@"Sort by Length", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Length));
|
||||
AddStep(@"Sort by Difficulty", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Difficulty));
|
||||
AddStep(@"Sort by Source", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Source));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -82,6 +82,9 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
case SortMode.Difficulty:
|
||||
return compareUsingAggregateMax(otherSet, b => b.StarDifficulty);
|
||||
|
||||
case SortMode.Source:
|
||||
return string.Compare(BeatmapSet.Metadata.Source, otherSet.BeatmapSet.Metadata.Source, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,9 @@ namespace osu.Game.Screens.Select.Filter
|
||||
RankAchieved,
|
||||
|
||||
[Description("Title")]
|
||||
Title
|
||||
Title,
|
||||
|
||||
[Description("Source")]
|
||||
Source,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user