rednblackgames / HyperLap2D

A powerful, platform-independent, visual editor for complex 2D worlds and scenes.
https://hyperlap2d.rednblack.games/
GNU General Public License v3.0
365 stars 66 forks source link

Improvements on UI: advanced Image selection and drag'n'drop of all selected ones to the Tiles panel #54

Closed jantwegener closed 3 years ago

jantwegener commented 3 years ago

Improved the UI by adding the possibility of selecting several images in the Resources panel (esp. Images). They can be (un)selected by holding ctrl and/or shift. By holding ctrl, the clicked on image is selected / unselected, by holding shift the images in between the previously and this clicked image are selected / unselected. A combination of ctrl and shift is also implemented. Clicking on any image, the selection is cleared and only the clicked one is selected. Via drag and drop, the selected images can all be transferred to the Tiles panel. The tiles in the Tiles panel can be manually sorted via drag and drop in the Tiles panel.

fgnm commented 3 years ago

Hi @jantwegener that's great! Many thanks for these improvements, feel free to join our Discord server too :) I've just two suggestions here:

  1. When there are multiple selected objects inside resource panel and they're dropped into Sandbox we could have two possible behavior: All objects selected are dropped into Sandbox; or all objects that are not dropped gets deselected.
  2. When dragging into tiled panel might be nice to highlight the box where you're switching it maybe with changing alpha or highlight the border.

Let me know what do you think about

jantwegener commented 3 years ago

Hi @fgnm my pleasure :) Your suggestions sound great.

  1. we should discuss in more detail which of the two options makes more sense from a user perspective.
  2. implemented, pushed and can be pulled.

Do you have an idea why all my commits are added to this pull request? Even those added after I have opened it?

fgnm commented 3 years ago

Thanks, pull requests works together with branches.. In general your forks you should have the master branch always even with the upstream repository and multiple branches for each different pull request. For this one we could go further as is, but in future could be better to follow this path.

Thinking more about 1, multiple drops to sandbox might be a rare scenario, I usually want to place each object individually dropping multiple stuff might result confusing.. So I'd say, at least for now, better to go with deselection

jantwegener commented 3 years ago

Yes, makes sense. Somehow in my head they I looked them as commit-based... Anyway, I will use branches in the future.

Another problem with dropping multiple into the sandbox is the layout of the dropped images. So I will go for a deselection style.