godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.44k stars 1.52k forks source link

gui_in_3d dropdown doesn't seem to work properly #1062

Open bugbountyguy opened 1 month ago

bugbountyguy commented 1 month ago

Which demo project is affected: gui_in_3d

OS/device including version: Linux, Godot v4.2.2

Issue description: When you click on the drop down and select an item, it looks like it works fine. But once you click anywhere else in the UI outside the dropdown, it opens the dropdown again. Clicking again appears to apply the change and allow you to use the UI like normal again.

I checked the events kicking off and noticed that on the first select, it doesn't appear to fire off any events to indicate it 'selected' an item in the dropdown menu. However, I confirmed that node_viewport.push_input(event) still gets called w/ the mouse down and mouse up, in the proper coordinates... So I'm unsure on what's going on and how to resolve this.

Didn't see any other issues mentioning this, so not sure if it's just me or it's just gone unnoticed.

Calinou commented 1 month ago

cc @Sauermann

It's a bit spotty for sure, but in my experience, I can get it to work again if I move the mouse outside and back inside the projected viewport.

bugbountyguy commented 1 month ago

So I finally found a potential work around... Changing the "Action Mode" to Button Release appears to have made it function correctly. So perhaps the Action Mode of Button Press is what's causing issues with this for some reason? :thinking: But yeah at least there is a work around. But I'm still curious on why it wouldn't work, just in case there are other UI elements that won't work (if/when I implement those in my game)

jan-Kulpas commented 4 weeks ago

In general, the code could be updated to 4.x because when I had a took through it, I didn't really know where to find all the deprecated things.

EDIT: My bad I just opened the outdated version in asset lib and didn't notice. Could be bumped up to the new version maybe?

Calinou commented 3 weeks ago

EDIT: My bad I just opened the outdated version in asset lib and didn't notice. Could be bumped up to the new version maybe?

You can find the new version on the asset library too: https://godotengine.org/asset-library/asset/2807

See the review comments on https://github.com/godotengine/godot-demo-projects/pull/925.

Sauermann commented 3 weeks ago

Thank you for opening this issue. I am aware of this behavior and intend to find the reason for it.