Can I get two events in one click from two different UMGs that overlap?

There are two UMGs. One is black and full screen size. The other one is blue and takes up half the screen.

I want to receive mouse event and touch event at UMG respectively

When you click on the blue UMG, the OnMouseButtonDown event also runs on the blue UMG.

All I want is the OnMouseButtonDown event to run on the black UMG as well.

Is there any other way than to call the event dispatcher?

I believe you meant:

[…]also runs on the black UMG.

You want both to receive input, right?


And yes, you would wrap the Blue in a user widget, override onMouseDown / onTouchStarted and pass Unahandled which would allow the input to bubble up in the widget hierarchy and reach the full screen black widget.

If Blue is a native image class, you can probably get away without wrapping - images can specifically override onMouseDown ← this may or may not work with Touch, never tried.

Thank you for your answer! Yes. Right.
I apologize that my question was not specific. :sweat_smile:

User widgets cannot be children like the picture above.
I also couldn’t find a panel that made this possible.

image

Actually, I’ve tried override the event in Blue and return unhandle.
The parent UMG_TEST (pictured Widget) can receive the OnMouseButtonDown / OnTouchStarted event, but I found it impossible in Black.

I’m testing the widget with the base image, but my project already has features and design implementations.

User widgets cannot be children like the picture above.

I do not see how this is even remotely relevant here. Be children is different from having children - what you show is contradicting. For user widgets to have children, one would expose Named Slots. You can then plug in any other widget there.


The overrides for User Widgets are here:

You then:

image

And the input goes through to reach the layer underneath. Perhaps I am misunderstanding something.

Already tried to return to unhandle. But, the result is that the top widget receives the mouse event. It’s not a widget that’s drawn on the back of Blue

Not sure then. Perhaps it’s an issue with UE5. Historically, Handled & Unhandled have worked well enough :expressionless:

You may need to resort to an Event Dispatcher.