Hi,
I have a widget created in the viewport and on top of this widget I create a smaller widget. the question is how to disable the control of the widget on the background and make active only the widget in front? Thank you in advance.
Widgets have few visibility modes (keep in mind you making widget so it works like any other individual widget you palce in it) which you can set with this node:
Modes are explained here:
So either Collapse widget to make it invisible or Hit Test Invisible if you want to make your widgets still visible but not usable
Another trick you can do is to add a very large (big as the biggest screen your game will ever be on), centered, center-anchor, fully visible Border component to the background of the Widget blueprint that goes on top, and set its alpha to 0. This intercepts clicks from going through to anything behind it.
‘s way is best, as this one can fail in some scenarios, but this way saves you the trouble of switching other widgets’ visibility back and forth. I use this technique to re-set focus on buttons if the user clicks outside of any of them, to keep gamepad navigation working when both mouse and gamepad are allowed to navigate.