mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Add new difficulty creation menu
This commit is contained in:
parent
e2fcdc394b
commit
3386f038ba
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user