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

Add property autocompletion for tween_property() #6739

Closed
KoBeWi opened this issue Apr 22, 2023 · 1 comment · Fixed by godotengine/godot#76591
Closed

Add property autocompletion for tween_property() #6739

KoBeWi opened this issue Apr 22, 2023 · 1 comment · Fixed by godotengine/godot#76591

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Apr 22, 2023

Describe the project you are working on

Game in Godot.

Describe the problem or limitation you are having in your project

I use Tweens quite a bit, but I sometimes lack some more friendly way to tween properties. tween_property() does not come with autocompletion, so it's one of the very few things that you need to type manually.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

tween_property() should provide autocompletion for property list, similar to e.g. method list when using old connect():
image
The list depends on the previous argument. It would appear here and list properties of the object in the first argument:
image

It would make it easier to pick properties to tween.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I think it would be implemented similarly to the aforementioned list of methods. I don't know if it's done via get_argument_options() or something different. I remember I tried to implement it myself a couple of times, but failed >_>

If this enhancement will not be used often, can it be worked around with a few lines of script?

Kind of? If you have no autocompletion, the workaround is to just write it I guess.

Is there a reason why this should be core and not an add-on in the asset library?

Not sure if possible. Tween is core feature tho and it would benefit everyone that uses it.

@Mickeon
Copy link

Mickeon commented Apr 23, 2023

This is unfortunately not possible with the current available methods, if not by making a special case for it. get_argument_options cannot infer the value of any previously inserted argument.

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

Successfully merging a pull request may close this issue.

3 participants