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

Add grid placement tool #26313

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Add grid placement tool #26313

wants to merge 19 commits into from

Conversation

OliBomby
Copy link
Contributor

@OliBomby OliBomby commented Jan 1, 2024

Part of #26303

Requires

Adds the 'Change grid' placement tool to the left tool box.

Mappers might want to align their grid with some hit objects they have already placed, so I also added a 'Grid from points' feature which allows the mapper to select two points on the playfield and then the grid aligns itself with those points. The origin is centered on the first point and then the spacing and rotation is determined by the difference between the two points. The two points will be on two neighbouring grid lines in the resulting grid.
This point selection has snapping to nearby objects so its easy to align it exactly with hit objects.
Also clicking with right click will end the point selection immediately so you can select just one point allowing you to change just the grid origin.

I repurposed the initial PR #26303 to add the remaining keybinds for cycling grid type.

osu._k6UmTIJN2n.mp4

This caused issues in rendering the outline of the grid because the outline was getting masked at some resolutions.
@bdach
Copy link
Collaborator

bdach commented Sep 20, 2024

Feature seems useful but as usual I have UX concerns.

2024-09-20.10-29-06.mp4

There is no guidance on how to use this feature. There is a button with no tooltip. You click on it and nothing visually happens. You click on it five times and maybe move it over the playfield and notice the grid starts moving. Only at that point you can probably figure out that you need to click the playfield twice to have it work. I'd still say both points should be visually indicated somehow rather than just relying on the grid but maybe that's optional.

The main problem is no indication on what you're supposed to do with the feature at all.

Also there is no way to cancel a grid change if you decide you don't want to change the grid anymore. Esc doesn't work.

Also I don't get what the criteria for the grid spacing subdividing is. It appears that it will decrease when the cursor moved too much between clicks 1 & 2, but I have no idea why it's doing what it's doing in particular.

There's also whatever this is:

2024-09-20.10-34-27.mp4

You can be in the "change grid" mode and still have things like object placement appear to work but they actually will not work and instead the grid change thing will take priority. At that point I'd start thinking if this shouldn't be a tool in the toolbox on the left.

@OliBomby OliBomby changed the title Add 'Grid from points' button Add grid changing placement tool Sep 23, 2024
@OliBomby
Copy link
Contributor Author

OliBomby commented Sep 23, 2024

I changed the 'grid from points' button into a placement tool like @bdach suggested. I think the UX is really nice now.

The diffstat became pretty big but most of it is from 1a81e12 which is mostly just refactoring name change. It should be pretty easy to review as that commit should not change any behaviours.

I'll need an icon for the new placement tool so that's still TODO

@OliBomby OliBomby changed the title Add grid changing placement tool Add grid placement tool Sep 23, 2024
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.

2 participants