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
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Rulesets.Edit;
|
2018-10-25 17:16:25 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
|
|
|
|
using OpenTK;
|
|
|
|
|
|
2018-10-26 12:39:19 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-10-03 12:28:00 +08:00
|
|
|
|
public class SliderSelectionMask : SelectionMask
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-10-25 17:16:25 +08:00
|
|
|
|
private readonly SliderCircleSelectionMask headMask;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-10-03 12:28:00 +08:00
|
|
|
|
public SliderSelectionMask(DrawableSlider slider)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
: base(slider)
|
|
|
|
|
{
|
|
|
|
|
var sliderObject = (Slider)slider.HitObject;
|
|
|
|
|
|
|
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
|
{
|
2018-10-25 17:16:25 +08:00
|
|
|
|
new SliderBodyMask(sliderObject),
|
|
|
|
|
headMask = new SliderCircleSelectionMask(slider.HeadCircle, sliderObject, SliderPosition.Start),
|
|
|
|
|
new SliderCircleSelectionMask(slider.TailCircle, sliderObject, SliderPosition.End),
|
2018-04-13 17:19:50 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-25 17:16:25 +08:00
|
|
|
|
public override Vector2 SelectionPoint => headMask.SelectionPoint;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|