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;
|
2018-10-03 13:35:26 +08:00
|
|
|
|
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;
|
2018-10-03 13:35:26 +08:00
|
|
|
|
AutoSizeAxes = Axes.Both;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
Position = hitCircle.Position;
|
|
|
|
|
|
2018-10-03 13:35:26 +08:00
|
|
|
|
InternalChild = new HitCircleMask((HitCircle)hitCircle.HitObject);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-10-04 11:19:11 +08:00
|
|
|
|
hitCircle.HitObject.PositionChanged += _ => Position = hitCircle.HitObject.StackedPosition;
|
|
|
|
|
hitCircle.HitObject.StackHeightChanged += _ => Position = hitCircle.HitObject.StackedPosition;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|