mirror of https://github.com/ppy/osu
Add the ability to disable user input on specific DrawableHitObjects
This commit is contained in:
parent
b259708915
commit
a2b3fe180e
|
@ -38,6 +38,19 @@ public abstract class DrawableHitObject : SkinReloadableDrawable
|
|||
private readonly Lazy<List<DrawableHitObject>> nestedHitObjects = new Lazy<List<DrawableHitObject>>();
|
||||
public IReadOnlyList<DrawableHitObject> NestedHitObjects => nestedHitObjects.IsValueCreated ? nestedHitObjects.Value : (IReadOnlyList<DrawableHitObject>)Array.Empty<DrawableHitObject>();
|
||||
|
||||
/// <summary>
|
||||
/// Whether this object should handle any user input events.
|
||||
/// </summary>
|
||||
public bool HandleUserInput { get; set; } = true;
|
||||
|
||||
public override bool HandlePositionalInput => HandleUserInput;
|
||||
|
||||
public override bool HandleNonPositionalInput => HandleUserInput;
|
||||
|
||||
public override bool PropagatePositionalInputSubTree => HandleUserInput;
|
||||
|
||||
public override bool PropagateNonPositionalInputSubTree => HandleUserInput;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a <see cref="JudgementResult"/> has been applied by this <see cref="DrawableHitObject"/> or a nested <see cref="DrawableHitObject"/>.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue