1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 21:47:25 +08:00

Merge pull request #28522 from bdach/better-slider-selection-box-size

Extend slider selection box bounds to contain all control points inside
This commit is contained in:
Dean Herbert 2024-07-03 16:51:07 +09:00 committed by GitHub
commit 505b85432d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,7 +55,21 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
[Resolved(CanBeNull = true)]
private BindableBeatDivisor beatDivisor { get; set; }
public override Quad SelectionQuad => BodyPiece.ScreenSpaceDrawQuad;
public override Quad SelectionQuad
{
get
{
var result = BodyPiece.ScreenSpaceDrawQuad.AABBFloat;
if (ControlPointVisualiser != null)
{
foreach (var piece in ControlPointVisualiser.Pieces)
result = RectangleF.Union(result, piece.ScreenSpaceDrawQuad.AABBFloat);
}
return result;
}
}
private readonly BindableList<PathControlPoint> controlPoints = new BindableList<PathControlPoint>();
private readonly IBindable<int> pathVersion = new Bindable<int>();