1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 13:17:26 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Edit/Masks/HitCircleSelectionMask.cs

27 lines
940 B
C#
Raw Normal View History

2018-04-13 17:19:50 +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
2018-10-03 12:45:41 +08:00
using osu.Framework.Graphics;
2018-04-13 17:19:50 +08:00
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Osu.Objects;
2018-04-13 17:19:50 +08:00
using osu.Game.Rulesets.Osu.Objects.Drawables;
2018-10-03 12:45:41 +08:00
namespace osu.Game.Rulesets.Osu.Edit.Masks
2018-04-13 17:19:50 +08:00
{
2018-10-03 12:28:00 +08:00
public class HitCircleSelectionMask : SelectionMask
2018-04-13 17:19:50 +08:00
{
2018-10-03 12:28:00 +08:00
public HitCircleSelectionMask(DrawableHitCircle hitCircle)
2018-04-13 17:19:50 +08:00
: base(hitCircle)
{
Origin = Anchor.Centre;
AutoSizeAxes = Axes.Both;
2018-04-13 17:19:50 +08:00
Position = hitCircle.Position;
InternalChild = new HitCircleMask((HitCircle)hitCircle.HitObject);
2018-04-13 17:19:50 +08:00
hitCircle.HitObject.PositionChanged += _ => Position = hitCircle.HitObject.StackedPosition;
hitCircle.HitObject.StackHeightChanged += _ => Position = hitCircle.HitObject.StackedPosition;
2018-04-13 17:19:50 +08:00
}
}
}