mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Add ability to sort by source in song select
This commit is contained in:
@ -304,6 +304,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
AddStep(@"Sort by BPM", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.BPM));
|
AddStep(@"Sort by BPM", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.BPM));
|
||||||
AddStep(@"Sort by Length", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Length));
|
AddStep(@"Sort by Length", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Length));
|
||||||
AddStep(@"Sort by Difficulty", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Difficulty));
|
AddStep(@"Sort by Difficulty", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Difficulty));
|
||||||
|
AddStep(@"Sort by Source", () => config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Source));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -82,6 +82,9 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
|
|
||||||
case SortMode.Difficulty:
|
case SortMode.Difficulty:
|
||||||
return compareUsingAggregateMax(otherSet, b => b.StarDifficulty);
|
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,
|
RankAchieved,
|
||||||
|
|
||||||
[Description("Title")]
|
[Description("Title")]
|
||||||
Title
|
Title,
|
||||||
|
|
||||||
|
[Description("Source")]
|
||||||
|
Source,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user