Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,20 @@ public partial class SlideSegmentHighlight : CompositeDrawable, IHasContextMenu

private IBindable<int> versionBindable;

[Resolved]
private SlideTapPiece slideTapPiece { get; set; } = null!;

public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
=> IsDragged || visual.ReceivePositionalInputAt(screenSpacePos) || dragDot.ReceivePositionalInputAt(screenSpacePos);
{
if (IsDragged)
return true;

// Special behaviour: We don't want to allow the slide segment to take control when the target is actually the tap.
if (slideTapPiece.ReceivePositionalInputAt(screenSpacePos))
return false;

return visual.ReceivePositionalInputAt(screenSpacePos) || dragDot.ReceivePositionalInputAt(screenSpacePos);
}

public SlideSegmentHighlight(Slide slide, int segmentIndex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ namespace osu.Game.Rulesets.Sentakki.Edit.Blueprints.Slides;
public partial class SlideSelectionBlueprint : SentakkiSelectionBlueprint<Slide, DrawableSlide>
{
private readonly SlideBodyHighlight? slideBodyHighlight;

[Cached]
private readonly SlideTapPiece slideTapHighlight;

private readonly TapPiece tapHighlight;

public override Quad SelectionQuad => slideTapHighlight.ScreenSpaceDrawQuad;

public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
=> slideTapHighlight.ReceivePositionalInputAt(screenSpacePos) || DrawableObject.SlideBodies.Select(s => s.Slidepath).Any(s => s.ReceivePositionalInputAt(screenSpacePos));

Expand Down
Loading