How to prevent a visible widget from absorbing click input?

  • As is shown in the picture, I have a mask widget(visibility is Visible) which has a circular transparent area in the center, while the rest part is translucent(indicates that nothing would happend when clicked).

  • What I wanted to achieve is, that the translucent area would block all the input click events as it supposed to be, while the transparent area would allow the clicking to pass though that mask, so that the central button(beneath the mask)would response. In other words, I need the central button to be the only clickable widget in the mask area.

  • What I have achieved is, that I’m able to check whether the clicking pos is within the transparent area or not. So the next step is to prevent that mask widget from absorbing the click events when I hit the transparent area.

  • I’ve been struggling for this for couple of days. Seems like after a widget absorbing the clicks, it would forward them to that widget’s parent, instead of keep going through. So far, the only solution I can tell, is to remove that transparent part from HitTestGrid, which needs to modifying source code.

  • Point me out if I’m wrong, any forms of help would be great appreciated, thank you in advance!

1 Like

You would have to set the Visibility of the elements that should not interact with the mouse to “Not Hit-Testable”. This can also be done at runtime: Set Visibility | Unreal Engine Documentation

301559-anmerkung-2020-05-10-095333.jpg

4 Likes

There is a bug currently in UE5 that when you set a Panel to Visible however it will ignore the input and let it go “through”.

1 Like

Hello,

i also had a problem when my UI is consuming the mouse clicks.
I always had to double click to make a simple click event.
I tried a lot and in the end i disabled “Supports Activation Focus” in “Common Activatable Widget”.
I use the Common UI Plugin. So I don´t know if this Checkbox is also in non Common UI Elements available.
Now it works :slight_smile:

Sir, THANK YOU