2018-04-13 18:19:50 +09: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;
|
2018-11-07 16:08:56 +09:00
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
2018-11-20 16:51:59 +09:00
|
|
|
|
using osuTK;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-11-07 16:08:56 +09:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
2018-04-13 18:19:50 +09:00
|
|
|
|
{
|
2018-11-07 16:21:32 +09:00
|
|
|
|
public class SliderSelectionBlueprint : OsuSelectionBlueprint
|
2018-04-13 18:19:50 +09:00
|
|
|
|
{
|
2018-11-06 17:56:04 +09:00
|
|
|
|
private readonly SliderCircleSelectionBlueprint headBlueprint;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-11-06 17:56:04 +09:00
|
|
|
|
public SliderSelectionBlueprint(DrawableSlider slider)
|
2018-04-13 18:19:50 +09:00
|
|
|
|
: base(slider)
|
|
|
|
|
{
|
|
|
|
|
var sliderObject = (Slider)slider.HitObject;
|
|
|
|
|
|
|
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
|
{
|
2018-10-26 13:51:03 +09:00
|
|
|
|
new SliderBodyPiece(sliderObject),
|
2018-11-06 17:56:04 +09:00
|
|
|
|
headBlueprint = new SliderCircleSelectionBlueprint(slider.HeadCircle, sliderObject, SliderPosition.Start),
|
|
|
|
|
new SliderCircleSelectionBlueprint(slider.TailCircle, sliderObject, SliderPosition.End),
|
2018-11-01 03:52:24 +09:00
|
|
|
|
new PathControlPointVisualiser(sliderObject),
|
2018-04-13 18:19:50 +09:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-06 17:56:04 +09:00
|
|
|
|
public override Vector2 SelectionPoint => headBlueprint.SelectionPoint;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
}
|
|
|
|
|
}
|