2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2019-09-27 17:45:22 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
|
|
|
|
|
2018-11-07 15:08:56 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-09-27 17:45:22 +08:00
|
|
|
|
public class SliderCircleSelectionBlueprint : OsuSelectionBlueprint<Slider>
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-10-01 18:33:24 +08:00
|
|
|
|
protected readonly HitCirclePiece CirclePiece;
|
|
|
|
|
|
2019-09-27 17:45:22 +08:00
|
|
|
|
private readonly SliderPosition position;
|
|
|
|
|
|
|
|
|
|
public SliderCircleSelectionBlueprint(DrawableSlider slider, SliderPosition position)
|
|
|
|
|
: base(slider)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-09-27 17:45:22 +08:00
|
|
|
|
this.position = position;
|
2020-01-24 16:50:36 +08:00
|
|
|
|
|
2019-10-01 18:33:24 +08:00
|
|
|
|
InternalChild = CirclePiece = new HitCirclePiece();
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
Select();
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-27 17:45:22 +08:00
|
|
|
|
protected override void Update()
|
|
|
|
|
{
|
|
|
|
|
base.Update();
|
|
|
|
|
|
2019-10-01 18:33:24 +08:00
|
|
|
|
CirclePiece.UpdateFrom(position == SliderPosition.Start ? HitObject.HeadCircle : HitObject.TailCircle);
|
2019-09-27 17:45:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
// Todo: This is temporary, since the slider circle masks don't do anything special yet. In the future they will handle input.
|
2018-09-26 13:01:15 +08:00
|
|
|
|
public override bool HandlePositionalInput => false;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|