mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 14:52:55 +08:00
Fix hold note masks not working
This commit is contained in:
parent
f299ae0fbd
commit
24b314b51f
@ -18,14 +18,12 @@ namespace osu.Game.Rulesets.Mania.Edit.Layers.Selection.Overlays
|
|||||||
public HoldNoteMask(DrawableHoldNote hold)
|
public HoldNoteMask(DrawableHoldNote hold)
|
||||||
: base(hold)
|
: base(hold)
|
||||||
{
|
{
|
||||||
Position = hold.Position;
|
|
||||||
|
|
||||||
var holdObject = hold.HitObject;
|
var holdObject = hold.HitObject;
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new NoteMask(hold.Head),
|
new HoldNoteNoteMask(hold.Head),
|
||||||
new NoteMask(hold.Tail),
|
new HoldNoteNoteMask(hold.Tail),
|
||||||
body = new BodyPiece
|
body = new BodyPiece
|
||||||
{
|
{
|
||||||
AccentColour = Color4.Transparent
|
AccentColour = Color4.Transparent
|
||||||
@ -40,5 +38,29 @@ namespace osu.Game.Rulesets.Mania.Edit.Layers.Selection.Overlays
|
|||||||
{
|
{
|
||||||
body.BorderColour = colours.Yellow;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user