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

Request: enum type custom property & select property name #3158

Closed
finscn opened this issue Oct 9, 2021 · 6 comments
Closed

Request: enum type custom property & select property name #3158

finscn opened this issue Oct 9, 2021 · 6 comments
Labels
feature It's a feature, not a bug.

Comments

@finscn
Copy link

finscn commented Oct 9, 2021

I hope there is a new type : enum.
User could select value.

And when create a new property, user cloud select a existing property name in current file.

And I also hope supply a feature like Type for Custom Property , User can export custom-property define to a json file.

@bjorn bjorn transferred this issue from mapeditor/tiled-extensions Oct 12, 2021
@bjorn
Copy link
Member

bjorn commented Oct 12, 2021

@finscn I've moved your issue to the Tiled repository. Please don't open feature requests for Tiled on the tiled-extensions repository.

I hope there is a new type : enum.
User could select value.

Is this request covered by issue #1211? This feature has recently been implemented and will be released with Tiled 1.8.

And when create a new property, user cloud select a existing property name in current file.

I can see the convenience here, but I'm unsure about scanning the entire asset for previously used property names. It could be done only once and a list of "seen" names could be cached somewhere for auto-completion purposes. Personally I'm more in favour of adding the option to pre-define custom properties, such that manually adding them is in most cases not necessary.

And I also hope supply a feature like Type for Custom Property , User can export custom-property define to a json file.

Can you elaborate on this request?

@bjorn bjorn added the feature It's a feature, not a bug. label Oct 12, 2021
@finscn
Copy link
Author

finscn commented Oct 14, 2021

Can you elaborate on this request?

e.g.
A custom property named "gender" , the valid values are male , female , other, unknown
I hope I could create a list for these values, user could select the value , not type the letter one by one.

@eishiya
Copy link
Contributor

eishiya commented Oct 15, 2021

e.g. A custom property named "gender" , the valid values are male , female , other, unknown I hope I could create a list for these values, user could select the value , not type the letter one by one.

This is possible with the enums feature that's coming with 1.8. In this example, the custom property type is "gender", and the specific property on this object is called "NPCGender".
image

@bjorn
Copy link
Member

bjorn commented Oct 16, 2021

e.g.
A custom property named "gender" , the valid values are male , female , other, unknown
I hope I could create a list for these values, user could select the value , not type the letter one by one.

Ah, I thought you were talking about something else there. Then I think your request is entirely covered by #1211 and already implemented, so I'll close this issue.

@bjorn bjorn closed this as completed Oct 16, 2021
@finscn
Copy link
Author

finscn commented Oct 29, 2021

e.g.
A custom property named "gender" , the valid values are male , female , other, unknown
I hope I could create a list for these values, user could select the value , not type the letter one by one.

Ah, I thought you were talking about something else there. Then I think your request is entirely covered by #1211 and already implemented, so I'll close this issue.

In #1211 the enum properties has been bind to a type .
But I hope there is a way to define properties standalone.

@bjorn
Copy link
Member

bjorn commented Oct 29, 2021

In #1211 the enum properties has been bind to a type .
But I hope there is a way to define properties standalone.

I'm sorry, what do you mean with standalone? For an enum property, you need to define somewhere the possible values of this enum. This is stored in the project file.

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

3 participants