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 a method dropdown list to the signal connection popup #5193

Closed
poohcom1 opened this issue Aug 18, 2022 · 5 comments
Closed

Add a method dropdown list to the signal connection popup #5193

poohcom1 opened this issue Aug 18, 2022 · 5 comments
Milestone

Comments

@poohcom1
Copy link

Describe the project you are working on

A 2D platformer/action game with a lot of signal connections

Describe the problem or limitation you are having in your project

In my projects, most signal connections are connected to existing methods, such as Character::on_hit -> HPBar::update_hp or Enemy::on_damage -> Shaker::shake, as opposed to creating unique methods tied to signals like HPBar::on_Character_on_hit.

When connecting signal via the signal connection popup, this becomes cumbersome as I would have to type out the specific method name each time. Furthermore, if there is a typo, it would create an entirely new method.

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

Adding a drop-down to select the method from the target node would make this process much more convenient and ensures that there are no typos.

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

A simple drop-down (OptionButton) popup activated by a button next to the method TextField should be sufficient.

godot signal method dropdown

I considered the idea of replacing the text field with the drop-down entirely and adding "New method..." as the final option which then displays the text field, but this would make the UI less convenient for users who prefer connecting signals the old way (creating new methods). Since I'm unsure what most user would prefer, I think the example above would be the most appropriate implementation.

The screenshot is from a basic implementation I made off the 3.5 branch: poohcom1/godot@8f8f49f

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

Not really, as this is about the editor.

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

This is a simple editor change that would be applicable to most projects.

@YuriSizov
Copy link
Contributor

We have a big PR that addresses this among other things, but it's in a bit of a limbo: godotengine/godot#27988. However, its implementation of the feature would be preferable to what is proposed here.

@poohcom1
Copy link
Author

We have a big PR that addresses this among other things, but it's in a bit of a limbo: godotengine/godot#27988. However, its implementation of the feature would be preferable to what is proposed here.

Ah, that is definitely what I am looking for, thanks for pointing that out. Wasn't aware that there was already an on-going PR for this, so I'll close this thread now.

@YuriSizov YuriSizov reopened this Aug 18, 2022
@YuriSizov
Copy link
Contributor

YuriSizov commented Aug 18, 2022

Let's keep it open. A proposal can be closed when the feature is implemented and merged. And in this case that PR may need to be salvaged and implemented in steps, one of which can be adding a method selector.

PS. Unless this a duplicate, then we can indeed close it. But I don't see anything linked in the PR.

@tom-jk
Copy link

tom-jk commented Aug 18, 2022

I don't think godot supports this natively at the moment, but assuming it might one day:
how about an editable combo box?

godot_gp_5193_editablecombobox0

you could type a name in, or set one from a dropdown of existing function names.

This would save a click and a little mouse travel time over opening a dialog.

@Frontrider
Copy link

Might be closable, godot 4 supports this.

@KoBeWi KoBeWi closed this as completed Apr 20, 2023
@KoBeWi KoBeWi added this to the 4.0 milestone Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants