osu/osu.Game.Rulesets.Osu/Edit/Masks/SliderMasks/SliderSelectionBlueprint.cs

34 lines
1.2 KiB
C#
Raw Normal View History

2018-04-13 09:19:50 +00: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 09:19:50 +00:00
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
using OpenTK;
2018-10-26 04:39:19 +00:00
namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks
2018-04-13 09:19:50 +00:00
{
2018-11-06 08:56:04 +00:00
public class SliderSelectionBlueprint : SelectionBlueprint
2018-04-13 09:19:50 +00:00
{
2018-11-06 08:56:04 +00:00
private readonly SliderCircleSelectionBlueprint headBlueprint;
2018-04-13 09:19:50 +00:00
2018-11-06 08:56:04 +00:00
public SliderSelectionBlueprint(DrawableSlider slider)
2018-04-13 09:19:50 +00:00
: base(slider)
{
var sliderObject = (Slider)slider.HitObject;
InternalChildren = new Drawable[]
{
2018-10-26 04:51:03 +00:00
new SliderBodyPiece(sliderObject),
2018-11-06 08:56:04 +00:00
headBlueprint = new SliderCircleSelectionBlueprint(slider.HeadCircle, sliderObject, SliderPosition.Start),
new SliderCircleSelectionBlueprint(slider.TailCircle, sliderObject, SliderPosition.End),
new PathControlPointVisualiser(sliderObject),
2018-04-13 09:19:50 +00:00
};
}
2018-11-06 08:56:04 +00:00
public override Vector2 SelectionPoint => headBlueprint.SelectionPoint;
2018-04-13 09:19:50 +00:00
}
}