2019-01-24 08:43:03 +00: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 09:19:50 +00:00
|
|
|
|
|
2019-10-21 08:14:08 +00:00
|
|
|
|
using osu.Framework.Graphics.Primitives;
|
2018-11-07 07:08:56 +00:00
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components;
|
2018-10-03 05:35:26 +00:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
2019-10-21 08:14:08 +00:00
|
|
|
|
using osuTK;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-11-07 07:08:56 +00:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-09-27 09:45:22 +00:00
|
|
|
|
public class HitCircleSelectionBlueprint : OsuSelectionBlueprint<HitCircle>
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-10-21 08:14:08 +00:00
|
|
|
|
protected new DrawableHitCircle DrawableObject => (DrawableHitCircle)base.DrawableObject;
|
|
|
|
|
|
2019-10-01 10:33:08 +00:00
|
|
|
|
protected readonly HitCirclePiece CirclePiece;
|
2019-09-27 09:45:22 +00:00
|
|
|
|
|
2019-10-21 08:04:56 +00:00
|
|
|
|
public HitCircleSelectionBlueprint(DrawableHitCircle drawableCircle)
|
|
|
|
|
: base(drawableCircle)
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-10-01 10:33:08 +00:00
|
|
|
|
InternalChild = CirclePiece = new HitCirclePiece();
|
2019-09-27 09:45:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Update()
|
|
|
|
|
{
|
|
|
|
|
base.Update();
|
|
|
|
|
|
2019-10-01 10:33:08 +00:00
|
|
|
|
CirclePiece.UpdateFrom(HitObject);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
2019-10-21 08:14:08 +00:00
|
|
|
|
|
|
|
|
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => DrawableObject.HitArea.ReceivePositionalInputAt(screenSpacePos);
|
|
|
|
|
|
2021-01-18 07:57:36 +00:00
|
|
|
|
public override Quad SelectionQuad => CirclePiece.ScreenSpaceDrawQuad;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|