1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 16:07:25 +08:00
osu-lazer/osu.Game.Rulesets.Mania/Edit/Masks/NoteSelectionMask.cs

40 lines
1.0 KiB
C#
Raw Normal View History

2018-05-20 18:22:42 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
2018-10-03 12:45:41 +08:00
namespace osu.Game.Rulesets.Mania.Edit.Masks
2018-05-20 18:22:42 +08:00
{
2018-10-03 12:28:00 +08:00
public class NoteSelectionMask : SelectionMask
2018-05-20 18:22:42 +08:00
{
2018-10-03 12:28:00 +08:00
public NoteSelectionMask(DrawableNote note)
2018-05-20 18:22:42 +08:00
: base(note)
{
Scale = note.Scale;
2018-06-07 18:19:32 +08:00
CornerRadius = 5;
Masking = true;
2018-05-20 18:22:42 +08:00
AddInternal(new NotePiece());
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Yellow;
}
2018-06-07 17:28:49 +08:00
protected override void Update()
{
base.Update();
Size = HitObject.DrawSize;
2018-06-07 17:59:52 +08:00
Position = Parent.ToLocalSpace(HitObject.ScreenSpaceDrawQuad.TopLeft);
2018-06-07 17:28:49 +08:00
}
2018-05-20 18:22:42 +08:00
}
}