2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2019-01-24 16:43:03 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-11-07 15:21:32 +08:00
|
|
|
|
|
2022-05-12 18:25:51 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
2018-11-07 15:21:32 +08:00
|
|
|
|
using osu.Game.Rulesets.Edit;
|
2022-05-12 18:25:51 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects;
|
2022-05-12 18:42:35 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components;
|
2018-11-07 15:21:32 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
2021-05-13 18:53:32 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
2022-05-12 18:25:51 +08:00
|
|
|
|
using osu.Game.Screens.Edit;
|
2018-11-07 15:21:32 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit.Blueprints
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public abstract partial class OsuSelectionBlueprint<T> : HitObjectSelectionBlueprint<T>
|
2019-09-27 17:45:22 +08:00
|
|
|
|
where T : OsuHitObject
|
2018-11-07 15:21:32 +08:00
|
|
|
|
{
|
2022-05-12 18:25:51 +08:00
|
|
|
|
[Resolved]
|
2023-06-23 00:37:25 +08:00
|
|
|
|
private EditorClock editorClock { get; set; } = null!;
|
2022-05-12 18:25:51 +08:00
|
|
|
|
|
2021-05-13 18:53:32 +08:00
|
|
|
|
protected new DrawableOsuHitObject DrawableObject => (DrawableOsuHitObject)base.DrawableObject;
|
2018-11-07 15:21:32 +08:00
|
|
|
|
|
2020-05-27 12:40:16 +08:00
|
|
|
|
protected override bool AlwaysShowWhenSelected => true;
|
|
|
|
|
|
2022-05-12 22:37:29 +08:00
|
|
|
|
protected override bool ShouldBeAlive => base.ShouldBeAlive
|
2023-03-28 17:48:55 +08:00
|
|
|
|
|| (DrawableObject is not DrawableSpinner && ShowHitMarkers.Value && editorClock.CurrentTime >= Item.StartTime && editorClock.CurrentTime - Item.GetEndTime() < HitCircleOverlapMarker.FADE_OUT_EXTENSION);
|
2022-05-12 18:25:51 +08:00
|
|
|
|
|
2021-05-13 18:53:32 +08:00
|
|
|
|
protected OsuSelectionBlueprint(T hitObject)
|
|
|
|
|
: base(hitObject)
|
2018-11-07 15:21:32 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|