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

Setting control node to pass and overriding _gui_input does not work #62599

Open
Nukiloco opened this issue Jul 1, 2022 · 1 comment
Open

Comments

@Nukiloco
Copy link

Nukiloco commented Jul 1, 2022

Godot version

v4.0.alpha.calinou [caa9ec8]

System information

Windows 10, Nvidia GTX 750 TI, Nvidia GTX 1050 TI

Issue description

From what I understand from the documentation on gui inputs:

Stop captures the mouse input events and doesn't allow them to pass on.
Pass captures the mouse input events but if its not accepted then it passes it on.
Ignore ignores the mouse input events and pass them on.

However in the reproduction project I have below, this doesn't seem to be happening with the Pass event.

Steps to reproduce

Download the reproduction project below, press F5 and run the project. Hover your mouse over the button and notice how its not being highlighted and that you can't click on it.

The main scene in this project is setup where all the control nodes are set to Ignore except...
Button which is set to Stop
Panel which is set to Pass

You will see that the Panel node has a script attached to it. In this script you can see that _gui_input is overridden but does not call accept_input at all. From my understanding, this should allow the input to pass into the Button.

Minimal reproduction project

GuiInputPassIssue.zip

@Nukiloco Nukiloco changed the title Setting control node to pass and overriding _gui_input does not work. Setting control node to pass and overriding _gui_input does not work Jul 1, 2022
@Sauermann
Copy link
Contributor

In your MRP, you want to pass the event to siblings and not to parents. This is currently not possible and what you experience is expected behavior.
This proposal summarizes the current situation: godotengine/godot-proposals#3613

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

3 participants