You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project:
Currently Control.mouse_filter defaults to MOUSE_FILTER_STOP. This means Mouse Inputs will not pass through the Node unless the user manually changes this behavior. Some Control nodes explicitly set this property, like Container which sets this to MOUSE_FILTER_PASS. (Or PanelContainer which sets it to MOUSE_FILTER_STOP, with this comment: // Has visible stylebox, so stop by default.)
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I propose to change the default behavior to MOUSE_FILTER_PASS, and to explicitly set to MOUSE_FILTER_STOP in Nodes where Input would be expected to stop. (Button, Text and Line Edit, ScrollBar, Tabs, and PanelContainer, etc.)
This would also mean that Nodes such as: Panel, ColorRect, TextureRect, and more, would Pass Mouse Input on, instead of blocking them.
I believe this change to be desirable due to my contributions in supporting the community, mainly discord, by answering help requests. One of the common struggles for people trying to build UI scenes, is that nodes will expectantly prevent Mouse Inputs from propagating. This problem can often be hard to spot, in many cases the blocking Control has no visuals, or the user set a Opague texture to use as an overlay.
An argument can be made that "Solid" Controls such as ColorRect or Panel should default to Stopping Input. But I find that Passing often does not lead to problems, and is more easily noticed when troubleshooting. (Its easier to tell why something IS happening, than why something IS NOT happening.)
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
The relevant property can be set in the constructor of each affected Class. I've tried this with a number of Control nodes and it seems to cause no immediate problems even in the Editor.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
The Goal is to bring the behavior in line with Expectations.
Is there a reason why this should be core and not an add-on in the asset library?:
TL:DR: Make Control Nodes default to Pass mouse inputs instead of Stopping it which can lead to inexpected behavior.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on:
Describe the problem or limitation you are having in your project:
Currently Control.mouse_filter defaults to MOUSE_FILTER_STOP. This means Mouse Inputs will not pass through the Node unless the user manually changes this behavior. Some Control nodes explicitly set this property, like Container which sets this to MOUSE_FILTER_PASS. (Or PanelContainer which sets it to MOUSE_FILTER_STOP, with this comment:
// Has visible stylebox, so stop by default.
)Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I propose to change the default behavior to MOUSE_FILTER_PASS, and to explicitly set to MOUSE_FILTER_STOP in Nodes where Input would be expected to stop. (Button, Text and Line Edit, ScrollBar, Tabs, and PanelContainer, etc.)
This would also mean that Nodes such as: Panel, ColorRect, TextureRect, and more, would Pass Mouse Input on, instead of blocking them.
I believe this change to be desirable due to my contributions in supporting the community, mainly discord, by answering help requests. One of the common struggles for people trying to build UI scenes, is that nodes will expectantly prevent Mouse Inputs from propagating. This problem can often be hard to spot, in many cases the blocking Control has no visuals, or the user set a Opague texture to use as an overlay.
An argument can be made that "Solid" Controls such as ColorRect or Panel should default to Stopping Input. But I find that Passing often does not lead to problems, and is more easily noticed when troubleshooting. (Its easier to tell why something IS happening, than why something IS NOT happening.)
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
The relevant property can be set in the constructor of each affected Class. I've tried this with a number of Control nodes and it seems to cause no immediate problems even in the Editor.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
The Goal is to bring the behavior in line with Expectations.
Is there a reason why this should be core and not an add-on in the asset library?:
TL:DR: Make Control Nodes default to Pass mouse inputs instead of Stopping it which can lead to inexpected behavior.
The text was updated successfully, but these errors were encountered: