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

[SUGGESTION] allow _get_property_list() to contribute to auto complete #27051

Closed
xDGameStudios opened this issue Mar 14, 2019 · 2 comments
Closed
Labels

Comments

@xDGameStudios
Copy link
Contributor

xDGameStudios commented Mar 14, 2019

OS/device including version:
N/A

Issue description:
Normally when working with tool you may want to expose custom variables to the to the inspector. For example allow _get_property_list to retrieve entries in a Dictionary... it would be nice if the suggestion for those properties should up in the autocomplete, if the dictionary is made const. if it is a constant and we are working with tool scripts I guess it would be doable? what do you think?

tool
extends Object
class_name MyObject

const dict = { "size": 1, "width": 2 }

func _get_property_list():
     var ret = []
     for a_name in dict:
          ret.append({"name": a_name, "type": TYPE_INT, "usage": PROPERTY_USAGE_DEFAULT})

this would make it possible to:

var a = MyObject.new()
a.size # this would appear in the autocomplete
a.width # this would appear in the autocomplete

What do you think? Worth it? Doable?

@xDGameStudios xDGameStudios changed the title [SUGGESTION] allow _get_property_list() to contribute to auto complete (virtual) [SUGGESTION] allow _get_property_list() to contribute to auto complete Mar 14, 2019
@mrcdk
Copy link
Contributor

mrcdk commented Mar 14, 2019

Duplicate of #25097

@xDGameStudios
Copy link
Contributor Author

Sorry for the dup @mrcdk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants