Can umg borders/images block clickthrough into the game world?

For example, in an RTS, (where the input mode must be “game and ui”), there are definitely situations where clicking on the background of an opaque umg border element on an onscreen menu, should not select a character pawn behind it.

I had assumed setting a umg border’s visibility to “visible” would consume the mouse click, but this is not the case. Am I missing something?

So the answer here is that border elements should return “handled” for the OnMouseButtonDown, OnMouseButtonUp, and OnMouseDoubleClick events with binding functions. It seems a bit silly to have to do this for every border we don’t want to be clickthrough, and other elements like images don’t have all the events exposed, but this is a serviceable workaround.

“-- is a serviceable workaround.”

Suppose, but then how to click through the image?

Selftest hit invisible

Agree, but you don’t need use binding functions (they are very resource consuming). You can override the functions from the tab MyBlueprint/Functions/Overridable.

1 Like