Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my first PR for this project, and it certainly deserves to be elaborated, so thank you in advance for your feedback.
Here are the explanations:
For my needs, I wanted to hide all the tiles or only some tiles belonging to a layer in a tilemap. I noticed that the TiledLayersStorage structure only contained the tiles for the last tileset and consequently, when I wanted to hide all the tiles, those belonging to the other tilesets remained visible.
Therefore, I slightly modified the structure from a HashMap of layer --> Storage Entity to
a HashMap of HashMap tileset --> layer -> Storage Entity.
This allows selecting all tiles, tiles of one or more tilesets, and/or one or more layers.
I updated the example in tiled.rs to demonstrate how to either hide/make visible all the tiles or just the tiles of the tileset containing the castle.