mirror of
https://github.com/ppy/osu
synced 2025-01-04 05:12:10 +00:00
Merge pull request #12732 from Joehuu/ss-sort-by-source
Add ability to sort by source in song select
This commit is contained in:
commit
002622a92c
@ -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]
|
||||
|
@ -71,6 +71,9 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
case SortMode.Author:
|
||||
return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
case SortMode.Source:
|
||||
return string.Compare(BeatmapSet.Metadata.Source, otherSet.BeatmapSet.Metadata.Source, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
case SortMode.DateAdded:
|
||||
return otherSet.BeatmapSet.DateAdded.CompareTo(BeatmapSet.DateAdded);
|
||||
|
||||
|
@ -28,7 +28,10 @@ namespace osu.Game.Screens.Select.Filter
|
||||
[Description("Rank Achieved")]
|
||||
RankAchieved,
|
||||
|
||||
[Description("Source")]
|
||||
Source,
|
||||
|
||||
[Description("Title")]
|
||||
Title
|
||||
Title,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user