1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 21:52:55 +08:00

Fix hold note masks not working

This commit is contained in:
smoogipoo 2018-06-07 19:00:02 +09:00
parent f299ae0fbd
commit 24b314b51f

View File

@ -18,14 +18,12 @@ namespace osu.Game.Rulesets.Mania.Edit.Layers.Selection.Overlays
public HoldNoteMask(DrawableHoldNote hold)
: base(hold)
{
Position = hold.Position;
var holdObject = hold.HitObject;
InternalChildren = new Drawable[]
{
new NoteMask(hold.Head),
new NoteMask(hold.Tail),
new HoldNoteNoteMask(hold.Head),
new HoldNoteNoteMask(hold.Tail),
body = new BodyPiece
{
AccentColour = Color4.Transparent
@ -40,5 +38,29 @@ namespace osu.Game.Rulesets.Mania.Edit.Layers.Selection.Overlays
{
body.BorderColour = colours.Yellow;
}
protected override void Update()
{
base.Update();
Size = HitObject.DrawSize;
Position = Parent.ToLocalSpace(HitObject.ScreenSpaceDrawQuad.TopLeft);
}
private class HoldNoteNoteMask : NoteMask
{
public HoldNoteNoteMask(DrawableNote note)
: base(note)
{
Select();
}
protected override void Update()
{
base.Update();
Position = HitObject.DrawPosition;
}
}
}
}