Skip to content

Fix dragging a hold note end outside playfield bypassing snapping#37025

Open
peppy wants to merge 6 commits intoppy:masterfrom
peppy:fix-mania-editor-drag-outside-playfield
Open

Fix dragging a hold note end outside playfield bypassing snapping#37025
peppy wants to merge 6 commits intoppy:masterfrom
peppy:fix-mania-editor-drag-outside-playfield

Conversation

@peppy
Copy link
Member

@peppy peppy commented Mar 18, 2026

At first I considered passing the SnapResult into subsequent snap operations to gain persistence of playfield (stored within), but this solution seems simpler.

We can assume that osu!mania is never going to have overlapping columns to the point that basing the editor considerations on closest column rather than containing column would become an issue. As far as I can tell.

Closes #36966.

@peppy peppy marked this pull request as ready for review March 18, 2026 06:08
@peppy peppy changed the title fix mania editor drag outside playfield Fix dragging a hold note end outside playfield bypassing snapping Mar 18, 2026
peppy added 3 commits March 18, 2026 15:11
At first I considered passing the `SnapResult` into subsequent snap
operations to gain persistence of playfield (stored within), but this
solution seems simpler.

We can assume that osu!mania is never going to have overlapping columns
to the point that basing the editor considerations on *closest* column
rather than *containing* column would become an issue. As far as I can
tell.

Closes ppy#36966.
@peppy peppy force-pushed the fix-mania-editor-drag-outside-playfield branch from 459433f to 71ff44b Compare March 18, 2026 06:11
@bdach bdach self-requested a review March 18, 2026 08:51
@bdach
Copy link
Collaborator

bdach commented Mar 18, 2026

(just merging master because inspectcode is like hallucinating errors that don't exist)

@bdach
Copy link
Collaborator

bdach commented Mar 18, 2026

^ didn't help... I'm probably just going to get out the inspectcode changes and hope they help with whatever this is...

On another note, not sure how to feel about the change in behaviour this brings in placement mode. Previously you couldn't place objects when the mouse cursor was outside of playfield in mania (though it was a little broken still):

Screen.Recording.2026-03-18.at.10.02.21.mov

Now you can do this and the placement isn't even visible until drag:

Screen.Recording.2026-03-18.at.10.03.07.mov

Probably shouldn't be allowed, or if it should, it should at least be shown?

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 19, 2026
@peppy
Copy link
Member Author

peppy commented Mar 19, 2026

I've fixed the issue you pointed out with placement. Note that some tests will require updates because of this change (likely the DI part).

Can you check 30d54d3 before I do this to make sure you agree with the direction?

/// If <c>false</c> is returned and a commit is attempted, the blueprint will be destroyed instead.
/// </remarks>
protected virtual bool IsValidForPlacement => true;
protected virtual bool IsValidForPlacement => PlacementActive != PlacementState.Waiting || hitObjectComposer.CursorInPlacementArea;
Copy link
Collaborator

@bdach bdach Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a superficial check this change looks potentially dicey. The conditions look right but I dunno that enforcing them at this deep a level (in terms of inheritance hierarchy, I mean) is correct.

The rest of the commit seems fine. Not sure whether you expected me to run this, all I did was an ocular patdown of the diff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, pretty much fine with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dragging outside playfield ignores beat snapping for LN tails

2 participants