-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add drawFill property to custom types to allow disabling the color fill #3564
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
Conversation
From @bjorn : Sorry but I couldn't quite understand how MapObjectItem::paint connects to the drawMapObject methods. I see the line where you set the opacity to 50. And I see your example of reading the type values I believe here:
But I don't quite get how to set the fill color in MapObjectItem::paint so that it would be used in drawMapObject JSON export worked and import seemed to as well, but when I reopen Tiled it doesn't seem to be automatically getting this value correctly so I probably missed somewhere where it gets initialized. Updated editor with toggle - might be awkward to have this on the "Use as" line so let me know if you want me to move it somewhere else |
5c4fec4
to
873f820
Compare
…ill not deserializing from project
This is partially working now, let me know if it's not what you had in mind. Test map/project |
eishiya raised the question of if this might be better served as an opacity slider rather than a boolean checkbox, for some more flexibility. What do you think? |
I was actually mostly there on restoring the property from the project file. I just was missing an assignment. Example screenshot of the feature on an orthogonal map Seems there's a bug though -- I might have done something wrong to cause this - when I first open the test isometric map I made, there are objects drawn in the wrong place. Mousing a tool over them clears them. Also eishiya and I noticed that this isn't working for "point" type objects. I guess those go through a different code path. Not a huge deal for me but I can change it just not sure what I missed. An example project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but I think it could be improved a little. See the comments. :-)
While I think point objects do need some customization, I don't think they need to respect this fill setting. |
Thanks for the feedback. Will try to work on this soon.
…On Mon, Feb 13, 2023, 6:12 AM Thorbjørn Lindeijer ***@***.***> wrote:
- Respect this setting for Point objects as well?
While I think point objects do need some customization, I don't think they
need to respect this fill setting.
—
Reply to this email directly, view it on GitHub
<#3564 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLWDQZUZJ6ORH5UO3J2OOTWXIJJLANCNFSM6AAAAAAURLFADM>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
* Pass MapObjectColors by 'const &' * Implement MapObject::effectiveColor based on MapObject::effectiveColors * Fixed MapObject::effectiveColors to fall back properly * MapObjectItem now stores a MapObjectColors instance and uses it when painting * Simplified MapObjectItem::paint for TMX Viewer
Respect this setting for Point objects as well?Fix Configurable setting to make objects display no fill color #3312
Feel free to squash if merged