1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-19 12:12:54 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Edit/Masks/SliderMasks/SliderSelectionMask.cs

33 lines
1.1 KiB
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
using osu.Framework.Graphics;
using osu.Game.Rulesets.Edit;
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
{
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-26 12:51:03 +08:00
new SliderBodyPiece(sliderObject),
headMask = new SliderCircleSelectionMask(slider.HeadCircle, sliderObject, SliderPosition.Start),
new SliderCircleSelectionMask(slider.TailCircle, sliderObject, SliderPosition.End),
2018-04-13 17:19:50 +08:00
};
}
public override Vector2 SelectionPoint => headMask.SelectionPoint;
2018-04-13 17:19:50 +08:00
}
}