Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various shortcomings in juice stream selection blueprint #28999

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Jul 22, 2024

I was looking at #28915 and attempting to see what was going on but the current UX of juice stream selection was tripping me up so I decided to fix first.

  • Makes undo work for adding / deleting path points
  • Unifies appearance with osu! slider control point pieces
    • Use same hover state
    • Use shift-right click for quick delete rather than shift-left click

Comment on lines +161 to +168
addAddVertexSteps(500, 180);
addVertexCheckStep(3, 1, 500, 180);

addAddVertexSteps(90, 200);
addVertexCheckStep(4, 1, times[0], positions[0]);

addAddVertexSteps(750, 180);
addVertexCheckStep(5, 4, 750, 180);
addAddVertexSteps(750, 200);
addVertexCheckStep(5, 4, 750, 200);
Copy link
Collaborator Author

@bdach bdach Jul 22, 2024

Choose a reason for hiding this comment

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

If these test "fixes" appear arbitrary - that is because they are. They would fail after the rest of the changes, and as far as I can tell that is just a manifestation of #28915 that wasn't there before due to the lack of inline UpdateHitObjectFromPath() calls. I would ask to look away from this for now while I attempt to figure out what is going on over there (it is not easy, 99% chance it is floating point hell).

double time = Math.Max(0, PositionToTime(relativePosition.Y));
int index = AddVertex(time, relativePosition.X);
UpdateHitObjectFromPath(juiceStream);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Calls are required to actually make undo/redo work, because without this call, nothing in the actual beatmap changes, and changeHandler?.EndChange() ends up being a no-op.

Copy link
Sponsor Member

@peppy peppy left a comment

Choose a reason for hiding this comment

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

Seems sensible.

@peppy peppy merged commit 5911c42 into ppy:master Jul 23, 2024
17 checks passed
@bdach bdach deleted the catch-juice-stream-editing-weirdness branch July 23, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants