mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Add new property to avoid overlapping usages
This commit is contained in:
parent
2f7d38d98b
commit
eac6271bd0
@ -25,12 +25,9 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints
|
||||
|| (DrawableObject is not DrawableSpinner && ShowHitMarkers.Value && editorClock.CurrentTime >= Item.StartTime
|
||||
&& editorClock.CurrentTime - Item.GetEndTime() < HitCircleOverlapMarker.FADE_OUT_EXTENSION);
|
||||
|
||||
public override bool HandlePositionalInput =>
|
||||
// Bypass fade out extension from hit markers for input handling purposes.
|
||||
public override bool IsSelectable =>
|
||||
// Bypass fade out extension from hit markers for selection purposes.
|
||||
// This is to match stable, where even when the afterimage hit markers are still visible, objects are not selectable.
|
||||
//
|
||||
// Note that we are intentionally overriding HandlePositionalInput here and not ReceivePositionalInputAt
|
||||
// as individual blueprint implementations override that.
|
||||
base.ShouldBeAlive;
|
||||
|
||||
protected OsuSelectionBlueprint(T hitObject)
|
||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// </summary>
|
||||
public event Action<SelectionBlueprint<T>> Deselected;
|
||||
|
||||
public override bool HandlePositionalInput => ShouldBeAlive;
|
||||
public override bool HandlePositionalInput => IsSelectable;
|
||||
public override bool RemoveWhenNotAlive => false;
|
||||
|
||||
protected SelectionBlueprint(T item)
|
||||
@ -125,6 +125,11 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// </summary>
|
||||
public virtual MenuItem[] ContextMenuItems => Array.Empty<MenuItem>();
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="SelectionBlueprint{T}"/> can be currently selected via a click or a drag box.
|
||||
/// </summary>
|
||||
public virtual bool IsSelectable => ShouldBeAlive && IsPresent;
|
||||
|
||||
/// <summary>
|
||||
/// The screen-space main point that causes this <see cref="HitObjectSelectionBlueprint"/> to be selected via a drag.
|
||||
/// </summary>
|
||||
|
@ -487,7 +487,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
break;
|
||||
|
||||
case SelectionState.NotSelected:
|
||||
if (blueprint.IsAlive && blueprint.IsPresent && quad.Contains(blueprint.ScreenSpaceSelectionPoint))
|
||||
if (blueprint.IsSelectable && quad.Contains(blueprint.ScreenSpaceSelectionPoint))
|
||||
blueprint.Select();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user