mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Add delete option to the right-click menu (#6770)
Add delete option to the right-click menu Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
commit
9223a00396
@ -80,8 +80,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
switch (action.ActionMethod)
|
||||
{
|
||||
case PlatformActionMethod.Delete:
|
||||
foreach (var h in selectedBlueprints.ToList())
|
||||
placementHandler.Delete(h.DrawableObject.HitObject);
|
||||
deleteSelected();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -144,6 +143,12 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
UpdateVisibility();
|
||||
}
|
||||
|
||||
private void deleteSelected()
|
||||
{
|
||||
foreach (var h in selectedBlueprints.ToList())
|
||||
placementHandler.Delete(h.DrawableObject.HitObject);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Outline Display
|
||||
@ -234,7 +239,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
createHitSampleMenuItem("Clap", HitSampleInfo.HIT_CLAP),
|
||||
createHitSampleMenuItem("Finish", HitSampleInfo.HIT_FINISH)
|
||||
}
|
||||
}
|
||||
},
|
||||
new OsuMenuItem("Delete", MenuItemType.Destructive, deleteSelected),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user