mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +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
|
|| (DrawableObject is not DrawableSpinner && ShowHitMarkers.Value && editorClock.CurrentTime >= Item.StartTime
|
||||||
&& editorClock.CurrentTime - Item.GetEndTime() < HitCircleOverlapMarker.FADE_OUT_EXTENSION);
|
&& editorClock.CurrentTime - Item.GetEndTime() < HitCircleOverlapMarker.FADE_OUT_EXTENSION);
|
||||||
|
|
||||||
public override bool HandlePositionalInput =>
|
public override bool IsSelectable =>
|
||||||
// Bypass fade out extension from hit markers for input handling purposes.
|
// 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.
|
// 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;
|
base.ShouldBeAlive;
|
||||||
|
|
||||||
protected OsuSelectionBlueprint(T hitObject)
|
protected OsuSelectionBlueprint(T hitObject)
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<SelectionBlueprint<T>> Deselected;
|
public event Action<SelectionBlueprint<T>> Deselected;
|
||||||
|
|
||||||
public override bool HandlePositionalInput => ShouldBeAlive;
|
public override bool HandlePositionalInput => IsSelectable;
|
||||||
public override bool RemoveWhenNotAlive => false;
|
public override bool RemoveWhenNotAlive => false;
|
||||||
|
|
||||||
protected SelectionBlueprint(T item)
|
protected SelectionBlueprint(T item)
|
||||||
@ -125,6 +125,11 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual MenuItem[] ContextMenuItems => Array.Empty<MenuItem>();
|
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>
|
/// <summary>
|
||||||
/// The screen-space main point that causes this <see cref="HitObjectSelectionBlueprint"/> to be selected via a drag.
|
/// The screen-space main point that causes this <see cref="HitObjectSelectionBlueprint"/> to be selected via a drag.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -487,7 +487,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SelectionState.NotSelected:
|
case SelectionState.NotSelected:
|
||||||
if (blueprint.IsAlive && blueprint.IsPresent && quad.Contains(blueprint.ScreenSpaceSelectionPoint))
|
if (blueprint.IsSelectable && quad.Contains(blueprint.ScreenSpaceSelectionPoint))
|
||||||
blueprint.Select();
|
blueprint.Select();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user