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