mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Sort difficulties by ruleset and star rating in menu
This commit is contained in:
parent
7012a1d934
commit
d6a47fd99c
@ -715,7 +715,17 @@ namespace osu.Game.Screens.Edit
|
||||
fileMenuItems.Add(new EditorMenuItemSpacer());
|
||||
|
||||
var beatmapSet = beatmapManager.QueryBeatmapSet(bs => bs.ID == Beatmap.Value.BeatmapSetInfo.ID) ?? playableBeatmap.BeatmapInfo.BeatmapSet;
|
||||
var difficultyItems = beatmapSet.Beatmaps.Select(createDifficultyMenuItem).ToList();
|
||||
|
||||
var difficultyItems = new List<MenuItem>();
|
||||
|
||||
foreach (var rulesetBeatmaps in beatmapSet.Beatmaps.GroupBy(b => b.RulesetID).OrderBy(group => group.Key))
|
||||
{
|
||||
if (difficultyItems.Count > 0)
|
||||
difficultyItems.Add(new EditorMenuItemSpacer());
|
||||
|
||||
foreach (var beatmap in rulesetBeatmaps.OrderBy(b => b.StarDifficulty))
|
||||
difficultyItems.Add(createDifficultyMenuItem(beatmap));
|
||||
}
|
||||
|
||||
fileMenuItems.Add(new EditorMenuItem("Change difficulty") { Items = difficultyItems });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user