mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Merge pull request #28288 from Hecatia-Lapislazuli/selection-mathing-slider-size
Fix path blueprint becoming desynced from slider path size
This commit is contained in:
commit
863f7151e0
@ -3,6 +3,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Skinning.Default;
|
||||
@ -27,14 +28,16 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
|
||||
public SliderBodyPiece()
|
||||
{
|
||||
InternalChild = body = new ManualSliderBody
|
||||
{
|
||||
AccentColour = Color4.Transparent
|
||||
};
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
// SliderSelectionBlueprint relies on calling ReceivePositionalInputAt on this drawable to determine whether selection should occur.
|
||||
// Without AlwaysPresent, a movement in a parent container (ie. the editor composer area resizing) could cause incorrect input handling.
|
||||
AlwaysPresent = true;
|
||||
|
||||
InternalChild = body = new ManualSliderBody
|
||||
{
|
||||
AccentColour = Color4.Transparent
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -61,7 +64,6 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
body.SetVertices(vertices);
|
||||
}
|
||||
|
||||
Size = body.Size;
|
||||
OriginPosition = body.PathOffset;
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
@ -11,10 +12,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
/// </summary>
|
||||
public partial class ManualSliderBody : SliderBody
|
||||
{
|
||||
public new void SetVertices(IReadOnlyList<Vector2> vertices)
|
||||
public ManualSliderBody()
|
||||
{
|
||||
base.SetVertices(vertices);
|
||||
Size = Path.Size;
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
public new void SetVertices(IReadOnlyList<Vector2> vertices) => base.SetVertices(vertices);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user