1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 02:33:02 +08:00

Add new difficulty creation menu

This commit is contained in:
Bartłomiej Dach 2022-01-23 16:34:02 +01:00
parent e2fcdc394b
commit 3386f038ba
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -77,6 +77,9 @@ namespace osu.Game.Screens.Edit
[Resolved]
private BeatmapManager beatmapManager { get; set; }
[Resolved]
private RulesetStore rulesets { get; set; }
[Resolved]
private Storage storage { get; set; }
@ -806,6 +809,7 @@ namespace osu.Game.Screens.Edit
fileMenuItems.Add(new EditorMenuItemSpacer());
fileMenuItems.Add(createDifficultyCreationMenu());
fileMenuItems.Add(createDifficultySwitchMenu());
fileMenuItems.Add(new EditorMenuItemSpacer());
@ -813,6 +817,16 @@ namespace osu.Game.Screens.Edit
return fileMenuItems;
}
private EditorMenuItem createDifficultyCreationMenu()
{
var rulesetItems = new List<MenuItem>();
foreach (var ruleset in rulesets.AvailableRulesets.OrderBy(ruleset => ruleset.OnlineID))
rulesetItems.Add(new EditorMenuItem(ruleset.Name));
return new EditorMenuItem("Create new difficulty") { Items = rulesetItems };
}
private EditorMenuItem createDifficultySwitchMenu()
{
var beatmapSet = playableBeatmap.BeatmapInfo.BeatmapSet;