Skip to content
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

Custom Property Datatype - "Selection" / "Enum" #3243

Closed
BlaXun opened this issue Jan 18, 2022 · 1 comment
Closed

Custom Property Datatype - "Selection" / "Enum" #3243

BlaXun opened this issue Jan 18, 2022 · 1 comment
Labels
feature It's a feature, not a bug.

Comments

@BlaXun
Copy link

BlaXun commented Jan 18, 2022

To prevent unaccepted values I think it would be really nice if custom properties could support a datatype "Enumeration".
That way, when adding objects with the Scripting API, we could easily "protect" the user from adding unaccepted values by providing a list of values to choose from.

If this is not possible, I suggest adding a signal to be emitted when a objects custom_property value was changed. At least that way we could verify the value and show a hint to the user that the given value is not accepted

@bjorn bjorn added the feature It's a feature, not a bug. label Jan 18, 2022
@bjorn bjorn changed the title [Request] Custom Property Datatype - "Selection" / "Enum" Custom Property Datatype - "Selection" / "Enum" Jan 18, 2022
@bjorn
Copy link
Member

bjorn commented Jan 18, 2022

This sounds like a duplicate of #1211, which was recently implemented and will be available in Tiled 1.8. I'm still working on making the custom enum (and class) types available in the scripting API, but the rest of the feature is available in the Tiled 1.8 beta.

@bjorn bjorn closed this as completed Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

2 participants