-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Tileset enum overlay #707
Tileset enum overlay #707
Conversation
Amazing stuff! Does it fair well with enums that have images assigned to them from a tileset, or does it just use the enum colors? Also I would maybe group the button with the grid toggle and the eye icon instead of putting on the bottom, but that's just a minor change. |
At the moment it just uses the assigned enum colours. I thought the layers may become cluttered and hard to scan if tiles and enum images were mixed together, but it's something I could look at.
I've already done that locally. It made more sense up with the other two options :) I can commit / push the change if you're planning to build the project yourself? I'm not going to spend much more time on this until the feature has been properly evaluated and I know I'm on the right track. |
@deepnight Is this something that has potential? |
Yes :) |
This was merged in 1.1.4 branch, which should be released in the next few weeks.
|
Thanks a lot for this very cool PR :) |
This change adds an overlay to tileset layers to show which tiles have which enum values assigned to them. It's triggered by clicking a new "Tile enums" option in the tool palette. Tiles with an enum value are outlined in the relevant colour, as defined in the tileset editor. Tiles with multiple enum values are indicated by nested outlines.
I made this change because I was finding it difficult to determine if tiles had enum set correctly. See #698. Also, this is my first encounter with a Haxe project so I could have taken the wrong approach with this, and there could be unforeseen issues that I've not though of.
Summary of changes:
tileEnumOverlays
boolean settingTilesetEnumChanged
event, triggered when an enum value is assigned, changed or removed from a tile.h2d.Graphics
instance to theLayerRenderer
, which is used to draw the overlay rectangles