Add the ability to delete slider control points using shift+right click

Closes https://github.com/ppy/osu/issues/10672.

In two minds about how this should be implemented but went in this
direction initially. The other way would be to add local handling of
Shift-Right Click inside PathControlPointPiece (which is already doing
mouse handling itself).
This commit is contained in:
Dean Herbert
2020-11-03 20:45:48 +09:00
parent 2d1db6a22d
commit 9f333ac58a
5 changed files with 48 additions and 9 deletions

View File

@ -143,5 +143,11 @@ namespace osu.Game.Rulesets.Edit
public virtual Quad SelectionQuad => ScreenSpaceDrawQuad;
public virtual Vector2 GetInstantDelta(Vector2 screenSpacePosition) => Parent.ToLocalSpace(screenSpacePosition) - Position;
/// <summary>
/// Handle to perform a partial deletion when the user requests a quick delete (Shift+Right Click).
/// </summary>
/// <returns>True if the deletion operation was handled by this blueprint. Returning false will delete the full blueprint.</returns>
public virtual bool HandleQuickDeletion() => false;
}
}