solarus-games / solarus-quest-editor

This repository was moved to GitLab: https://gitlab.com/solarus-games/solarus-quest-editor
Other
96 stars 30 forks source link

Feature request: group entities in the editor. #126

Open christopho opened 8 years ago

christopho commented 8 years ago

From @Diarandor on March 25, 2015 16:36

Hi! I thought that it would be nice to have some button to glue several entities (or at least tiles) of the map editor; this option should be either a button above in the editor or an option for the right click context menu when a group of entities is selected at the same time (or maybe in both places).

This is useful, for instance, if you create a house on the map editor and later you decide to move it to another part of the map, you would not need to move all the sprites/entities of the house one by one. In the context menu that appears with right click on a group of glued entities, there should be an option to unglue all the entities glued in that group. It should also be possible to glue two groups of glued entities in a new one, and to copy-paste groups of glued entities.

I suggest to add 2 buttons in the editor, above. One to glue selected entities. The other button would be a "check box" to enable/disable the "glue feature" temporarily (this would allow to move an entity with respect of the entities of the same glued group without ungluing the group). In other words, when the "glue feature" is enabled, if you click on an entity of the grup, all the entities of its group would be selected at the same time; if the feature is disabled, only the entity in which you click would be selected, but not the other entities of its group.

Thanks a lot!!!

Copied from original issue: christopho/solarus#665

christopho commented 8 years ago

This is probably a good idea.

christopho commented 8 years ago

From @Morwenn on March 26, 2015 8:25

Where is the « like » button?

maxamine commented 8 years ago

I thought we already had this feature request #104

christopho commented 8 years ago

Indeed! Thanks @maxamine

maxamine commented 8 years ago

you're welcome @christopho ^^

Diarandor commented 7 years ago

Remark: note that moving the grouped entities up/down to the next layer will work (when "+" or "-" is pressed), because this already works when several entities are selected.

However, if we do right click on the group and select a layer, we may break the difference of layers betwen different entities of the group if all of them are put in the selected layer. One solution is to disable that option from the context menu and force to use "+" and "-" for changes of layer. Another solution is to put the entity of the group where we have clicked in the chosen layer, and shift the layers of the other entities of the group to keep the original difference of layers.

Diarandor commented 7 years ago

We could allow nested groups if you like the idea. This is just an idea that could make this feature even more flexible, but also slightly more complex to implement.

If we glue several groups together, instead of creating a new group with all the tiles of the previous groups, we could create a new group of tiles containing the previous groups as "subgroups", i.e., without breaking them. In this way, if we "break" a group, it will split as the groups and tiles that were joined to create it, instead of splitting in all its tiles. (There could be 2 options in the context menu of a group: "Break to tiles" and "Break to groups".)

christopho commented 7 years ago

Grouping will also be a first step to implement autotiles.