-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Use MOUSE_FILTER_PASS for all containers #35068
Use MOUSE_FILTER_PASS for all containers #35068
Conversation
Related: #24083 (but that one would be for 4.0). |
Parts of the editor code that sets the filtering to pass in containers should be removed too, these are the ones that I found at first glance: godot/editor/editor_audio_buses.cpp Line 859 in 33be750
|
c9ea6f9
to
0c8e4a4
Compare
Thanks, removed all occurrences I found in |
@@ -1335,7 +1334,6 @@ GraphEdit::GraphEdit() { | |||
top_layer->set_mouse_filter(MOUSE_FILTER_PASS); | |||
top_layer->set_anchors_and_margins_preset(Control::PRESET_WIDE); | |||
top_layer->connect("draw", this, "_top_layer_draw"); | |||
top_layer->set_mouse_filter(MOUSE_FILTER_PASS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is not a Container, but the mouse filter was already set to Pass
on line 1335.
Containers are meant to forward mouse input to their the Controls they contain. PanelContainer has a visible Panel stylebox, so it still defaults to STOP. Fixes godotengine#34933.
0c8e4a4
to
e2bebfb
Compare
PR godotengine#35068 made Container (which GraphNode inherits) default to MOUSE_FILTER_PASS, so I removed the manual override, but it turns out that GraphNode's constructor still overrides it to MOUSE_FILTER_STOP. Another fix could be to remove the STOP in the constructor, but I don't know if it's there for a specific reason (e.g. to have GraphNodes STOP by default, but PASS in a specific case). Fixes godotengine#35978.
Containers are meant to forward mouse input to their the Controls
they contain.
Fixes #34933.
Putting this up for discussion, I haven't thoroughly tested yet.
Apart from
GridContainer
andBoxContainer
-derived classes which already defaulted toPASS
, this changes the behavior forCenterContainer
,MarginContainer
,PanelContainer
,ScrollContainer
,SplitContainer
,TabContainer
,ViewportContainer
and the baseContainer
. Might have unforeseen consequences if nobody noticed this discrepancy in 6 years.