1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Fix control points disappearing if moved offscreen

This commit is contained in:
smoogipoo 2018-10-29 16:15:04 +09:00
parent c1fffde10d
commit 2ae7b42244

View File

@ -31,19 +31,20 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components
this.index = index; this.index = index;
Origin = Anchor.Centre; Origin = Anchor.Centre;
Size = new Vector2(10); AutoSizeAxes = Axes.Both;
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
path = new SmoothPath path = new SmoothPath
{ {
BypassAutoSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
PathWidth = 1 PathWidth = 1
}, },
marker = new CircularContainer marker = new CircularContainer
{ {
RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(15),
Masking = true, Masking = true,
Child = new Box { RelativeSizeAxes = Axes.Both } Child = new Box { RelativeSizeAxes = Axes.Both }
} }
@ -69,6 +70,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components
path.OriginPosition = path.PositionInBoundingBox(Vector2.Zero); path.OriginPosition = path.PositionInBoundingBox(Vector2.Zero);
} }
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => marker.ReceivePositionalInputAt(screenSpacePos);
protected override bool OnDragStart(DragStartEvent e) => true; protected override bool OnDragStart(DragStartEvent e) => true;
protected override bool OnDrag(DragEvent e) protected override bool OnDrag(DragEvent e)