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

Control EventPropagation options rather than MouseFilter #1775

Open
nathanfranke opened this issue Nov 5, 2020 · 0 comments
Open

Control EventPropagation options rather than MouseFilter #1775

nathanfranke opened this issue Nov 5, 2020 · 0 comments

Comments

@nathanfranke
Copy link
Contributor

nathanfranke commented Nov 5, 2020

Original: godotengine/godot#16863 (comment)
WIP: https://github.com/nathanfranke/godot/tree/event-propagation

Describe the project you are working on:
Particularly UI focused applications.

Describe the problem or limitation you are having in your project:
Often, input events are captured without one knowing, especially using container nodes. The mouse filter workflow is generally confusing and needs a change of some sort.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Modification of the mouse filtering system with some key behavioural changes.

EVENT_PROPAGATION_NONE - Same as MOUSE_FILTER_STOP
EVENT_PROPAGATION_PARENT - Same as MOUSE_FILTER_PASS
EVENT_PROPAGATION_ALL - Similar to MOUSE_FILTER_IGNORE, but the event is still passed to this control. If a user doesn't want to process inputs on this control, that shouldn't be done here; one should use set_process_input.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
New Control Input Group:
image

Example using this hierarchy:

  • Scene
    --- Red (Propagation All, shouldn't matter)
    ------ Green (Propagation All)
    ------ Blue (Propagation Parent)
    image

Hovering over Blue should yield "Blue->Red"
If Blue Propagation is set to All, it should yield "Blue->Green->Red"

If this enhancement will not be used often, can it be worked around with a few lines of script?:
This should be used often, plus it is a modification to an existing API

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

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

2 participants