1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 06:13:21 +08:00

Delete all selected objects if shift-clicked on one

This commit is contained in:
Bartłomiej Dach 2020-10-31 11:35:25 +01:00
parent ea007af572
commit 129b1bc6d3

View File

@ -226,13 +226,21 @@ namespace osu.Game.Screens.Edit.Compose.Components
internal void HandleSelectionRequested(SelectionBlueprint blueprint, InputState state)
{
if (state.Keyboard.ShiftPressed && state.Mouse.IsPressed(MouseButton.Right))
EditorBeatmap.Remove(blueprint.HitObject);
handleQuickDeletion(blueprint);
else if (state.Keyboard.ControlPressed && state.Mouse.IsPressed(MouseButton.Left))
blueprint.ToggleSelection();
else
ensureSelected(blueprint);
}
private void handleQuickDeletion(SelectionBlueprint blueprint)
{
if (!blueprint.IsSelected)
EditorBeatmap.Remove(blueprint.HitObject);
else
deleteSelected();
}
private void ensureSelected(SelectionBlueprint blueprint)
{
if (blueprint.IsSelected)