-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add grid placement tool #26313
Conversation
This caused issues in rendering the outline of the grid because the outline was getting masked at some resolutions.
Feature seems useful but as usual I have UX concerns. 2024-09-20.10-29-06.mp4There 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.mp4You 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. |
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 |
No idea about the tooltip changes I just wangs some shit to make it compile so I could comment on the UX.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated UX feedback.
Yes left-click twice has the same behaviour, but I prefer to use a single right-click instead. It doesn't hurt to have a little redundancy to make it a bit easier to use right?
It already clears the user's selection, but if you prefer it being on the left I'll move it there.
There's a good reason for that. I made the spacing match the range of the grid spacing cycle hotkey which is [4,64), so you can always cycle the spacing value back to the original value you got from the grid placement tool. I think these are all reasonable spacing values, beyond that there are so few snappable points on the screen that it is barely of any utility. The limit on the spacing slider is intentionally bigger for the off-chance you want to use a big spacing, so you can set that manually. The grid placement tool and the spacing cycling hotkey are tools that set the spacing automatically so I think it makes sense to restrict them to a range of more reasonable values. I hope to get this in the next release, so I'll be available to reply to any feedback ASAP |
Let me rephrase: because it clears the selection, I think it should be on the left. Users are understanding that their selection will be lost when changing tools here. A button on the right randomly nuking a selection is unexpected. |
That makes sense. I've moved it back to the left toolbox. |
I'd either call the toolbox item "Grid" or "Place grid". The first may fit better with the other tools? @bdach thoughts? Also I think the FA icon looks nicer: diff --git a/osu.Game.Rulesets.Osu/Edit/GridFromPointsTool.cs b/osu.Game.Rulesets.Osu/Edit/GridFromPointsTool.cs
index bc143886ce..11c97d78d9 100644
--- a/osu.Game.Rulesets.Osu/Edit/GridFromPointsTool.cs
+++ b/osu.Game.Rulesets.Osu/Edit/GridFromPointsTool.cs
@@ -3,7 +3,6 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
-using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Tools;
using osu.Game.Rulesets.Osu.Edit.Blueprints;
@@ -13,7 +12,7 @@ namespace osu.Game.Rulesets.Osu.Edit
public partial class GridFromPointsTool : CompositionTool
{
public GridFromPointsTool()
- : base("Change grid")
+ : base("Place grid")
{
TooltipText = """
Left click to set the origin.
@@ -23,7 +22,7 @@ Right click to only set the origin.
""";
}
- public override Drawable CreateIcon() => new SpriteIcon { Icon = OsuIcon.EditorPlaceGrid };
+ public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.Solid.DraftingCompass };
public override PlacementBlueprint CreatePlacementBlueprint() => new GridPlacementBlueprint();
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
This reverts commit db10202.
I agree. "Grid" fits better in the theme of the other placement tools. |
Either's fine, would weakly prefer first. |
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