osu/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderCircleSelectionBlueprint.cs

36 lines
1.2 KiB
C#
Raw Normal View History

// 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 09:19:50 +00:00
using osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components;
2018-04-13 09:19:50 +00:00
using osu.Game.Rulesets.Osu.Objects;
2018-11-07 07:08:56 +00:00
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
2018-04-13 09:19:50 +00:00
{
public class SliderCircleSelectionBlueprint : OsuSelectionBlueprint<Slider>
2018-04-13 09:19:50 +00:00
{
protected readonly HitCirclePiece CirclePiece;
private readonly SliderPosition position;
public SliderCircleSelectionBlueprint(Slider slider, SliderPosition position)
: base(slider)
2018-04-13 09:19:50 +00:00
{
this.position = position;
2020-01-24 08:50:36 +00:00
InternalChild = CirclePiece = new HitCirclePiece();
2018-04-13 09:19:50 +00:00
Select();
}
protected override void Update()
{
base.Update();
CirclePiece.UpdateFrom(position == SliderPosition.Start ? (HitCircle)HitObject.HeadCircle : HitObject.TailCircle);
}
2018-04-13 09:19:50 +00:00
// Todo: This is temporary, since the slider circle masks don't do anything special yet. In the future they will handle input.
public override bool HandlePositionalInput => false;
2018-04-13 09:19:50 +00:00
}
}