[UMG] Button registering click only when player is "ejected"

Hi everyone,

I have a typical setup - a button widget nested inside a grid. In our first-person-view game I need to access inventory on “I” click (or console button) and hide it as well. This all works. The problem is with the button itself because for some reason I am not able to explain it gets the click event ONLY when one of the following conditions occur:

1, player is ejected (F8 key)
2, I previously messed with widget reflector
3, I am debugging the blueprint

However when I run the game as it should be regardles of if in editor or standalone, it never gets that event.

The common denominator is that if player controller is taking over, the mouse click is discarded.

Another important thing is that hover works and the button is not covered with anything else (I validated this in widget reflector tool).

I am sure it’s something stupid on my side but I am battling this for far too long. Is there some additional project setup needed for this to work?

This is how switching blueprint looks like:

Also minor isssue is that when using widget reflector, it doesn’t recalculate so the box for focus is shown elsewhere if you use it with PIE.

Thanks a lot for any pointers.

I had a funny situation a while back and it worked after I detached “Get Player Controller” from whatever “fuction set input mode” was … detach and try…And im using 4.8…

OK. Here is the solution (although I am convinced it’s actually a bug, not a feature).

The button MUST have set pressed image. If it doesn’t have one and player presses the mouse button, the image gets changed to nothing which causes obviously mouse to lose the focus and the click is propagated expost to a different object.

Setting “Pressed Image” immediately cured this.

I would personally vote for keeping source shape as a region, but knowing this simple cure I spent overs hours to find, I can live with this behavior. :slight_smile: