1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 04:51:26 +08:00

Add delete option to the right-click menu

This commit is contained in:
smoogipoo
2019-11-08 19:44:47 +09:00
Unverified
parent df08a95734
commit 97ea07db0e
@@ -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),
};
}
}