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

Change behavior: Rotate and flip Objects before placement. #3091

Closed
UliAbo opened this issue Jun 30, 2021 · 11 comments
Closed

Change behavior: Rotate and flip Objects before placement. #3091

UliAbo opened this issue Jun 30, 2021 · 11 comments
Labels
feature It's a feature, not a bug. good first issue Good thing to start with, and don't be shy to ask for help! usability Generally about making something more intuitive or efficient.

Comments

@UliAbo
Copy link

UliAbo commented Jun 30, 2021

Goal:

  • Make level designing with Objects more natural by changing the order of placement and rotation / flipping Objects.

AsIs:

  1. Select Object from Tileset.
  2. MouseCursor turns into a "GhostPreview" showing the selected Object in a half-transparent way.
  3. Place Object in the Map by pressing LMB.
  4. Optional: Rotate / flip placed Object. (This feels inconvenient because when the Object is not centered for rotation, I need to drag and drop it again for replacement after rotation.)

ToBe:

  1. Select Object from Tileset.
  2. MouseCursor changes as in "AsIs" above.
  3. Optional: Rotate / flip Object "in the hand" before placement. So the "GhostPreview" is updated with the rotated Object.
  4. Place Object in the Map by pressing LMB.

I'm looking forward to your feedback :)

@bjorn bjorn added feature It's a feature, not a bug. usability Generally about making something more intuitive or efficient. labels Jul 1, 2021
@bjorn
Copy link
Member

bjorn commented Jul 1, 2021

The flip and rotate actions currently always apply to the selected objects, but with your suggestion they should instead apply to the preview while placing an object. I think that makes a lot of sense.

@bjorn bjorn added the good first issue Good thing to start with, and don't be shy to ask for help! label Jul 1, 2021
@UliAbo
Copy link
Author

UliAbo commented Jul 1, 2021

Great! I would love to see that implemented.

@bjorn bjorn closed this as completed in a5fba23 Oct 19, 2021
bjorn added a commit that referenced this issue Oct 19, 2021
The flip/rotate will now always apply to the preview, even if it is not
currently active, rather than applying to the selection (usually the
last placed object) in that case.

If you want to actually flip or rotate the selection, you now need to
exit the placement tool (can be done by Escape, for example). I think
this is not a huge loss, because it makes the transformation actions
more consistent and enables clicking the tool bar buttons to activate
them.

Issue #3091
@bjorn
Copy link
Member

bjorn commented Oct 19, 2021

@UliAbo In my initial implementation, the transformation actions did not apply to the preview when it wasn't there (so, when the mouse wasn't over the map). The main problem with this was that clicking the tool bar buttons would not work (it would still only apply to the selection). I've now pushed a follow-up change, that makes the behavior consistently affect the preview as long as the placement tool is selected, which I think is a preferable behavior.

And thanks for bringing this up, I think it was a good improvement!

@UliAbo
Copy link
Author

UliAbo commented Feb 11, 2022

I'm glad to see this now in action in Tiled v1.8, that feels really good!

@eishiya
Copy link
Contributor

eishiya commented Feb 12, 2022

Because of this change, it is now no longer impossible to flip the placed object after the fact even though it's selected as if it can be edited. The user must press Esc first, which will "finish" placing the object and take them to Select Objects mode. Reported on the forum: https://discourse.mapeditor.org/t/request-new-feature/5449 (point 4)

Perhaps the new object's properties should show up in the properties panel for editing, but the object shouldn't show up as selected, so that it's clearer that flipping will not affect the placed object?

@UliAbo
Copy link
Author

UliAbo commented Feb 14, 2022

Very good observed, I didn't notice that for now.
What about just not having "selected" the placed Object at all? Then this would make more sense for me.
When mapping, I constantly switch between "Insert Tile" and "Select Objects" so this would be suitable for me. What do you think?

@bjorn
Copy link
Member

bjorn commented Feb 14, 2022

I think newly placed objects should be selected, but maybe the selection just appears too "active". What if we would only show the full animated selection outline when the "Select Objects" tool is selected, and showing the "hover" version otherwise?

@UliAbo
Copy link
Author

UliAbo commented Feb 14, 2022

Just to understand it better - why is it good to have it selected? To quickly see the properties or is there another reason?

EDIT:
Second Thought:
I mapped here some observations:

AsIs:

  1. User clicks in Tilesets Viewer (what's the correct the for that?) on Object A to select it. In Property window its properties are shown (the leaner info without map info).
  2. User places chosen Object A on the Map. Placed Object A is automatically selected. In Property window there are infos displayed about this placed Object (e.g. now with more info than before, e.g. with its coordinates in the Map).
  3. User clicks somewhere else to deselect the placed Object A.
  4. Now strangely - although the placed Object is not selected anymore - the Property window still shows its full infos (incl. the map related ones), which feels wrong to me, as there's no reference anymore, feels like a leftover.
  5. To compensate this, I now have to select in the Tilesets Viewer Object B and then Object A again to have its leaner info displayed in the Property window.

ToBe:

  1. (instead of point 4 and 5 above) As soon as the User deselects a placed Object, the Property window is updated to the chosen (not placed) Object in the Tilesets Viewer.

What do you think? :-) I can post this as a separated issue.

@bjorn
Copy link
Member

bjorn commented Feb 14, 2022

Just to understand it better - why is it good to have it selected? To quickly see the properties or is there another reason?

I probably thought it was expected and helpful behavior, since it is also done by Inkscape for example and it allows immediately editing the object's properties after placement without requiring to switch tools and then select the just placed object. Tiled behaves this way since Tiled 0.13 (2b0313b), but unfortunately I didn't provide any context for this change.

6. (instead of point 4 and 5 above) As soon as the User deselects a placed Object, the Property window is updated to the chosen (not placed) Object in the Tilesets Viewer.

Well, this is indeed rather unrelated behavior, but I don't think this suggestion would really work. The Properties view displays the properties of the last clicked / selected thing. If you deselect something, without selecting something else, there is no way for it to know what it should display. It could switch to anything (currently selected tile (like you're suggesting), currently selected layer, current map, etc.). So personally I think the choice is mainly between displaying nothing or to keep displaying the last clicked / selected thing (current behavior).

@UliAbo
Copy link
Author

UliAbo commented Feb 14, 2022

there is no way for it to know what it should display.

Maybe we have a misunderstanding here :-)
From my understanding, there's actually a default or fallback behavior for this already implemented. When the User has just "chosen" a Tile Object (I'm not talking about Tiles, I mean really Objects) in the Tileset Viewer, then you have Property Infos about that displayed (but no coordinates like described above). Why can't this be the fallback behavior in any case where nothing is selected?

@bjorn
Copy link
Member

bjorn commented Feb 14, 2022

When the User has just "chosen" a Tile Object (I'm not talking about Tiles, I mean really Objects) in the Tileset Viewer, then you have Property Infos about that displayed (but no coordinates like described above).

You can't choose a "tile object" from the Tilesets view. When you click something there, the displayed properties are those of the selected tile. The Properties view can't display the properties of objects that have not been created yet.

Why can't this be the fallback behavior in any case where nothing is selected?

How would we decide which fallback to pick? Why would we make the last selected tile the current object again, rather than say, the selected layer, terrain set / type or the map itself?

@bjorn bjorn moved this to Completed in Roadmap Feb 3, 2023
@bjorn bjorn added this to Roadmap Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug. good first issue Good thing to start with, and don't be shy to ask for help! usability Generally about making something more intuitive or efficient.
Projects
Archived in project
Development

No branches or pull requests

3 participants