Disabling input in menu widget?

Hi

I am askig the player for a confirmation of a certain action (game quit). This is done with a small additional widget displayed on top of the main menu.

How can I disable the Main menu without removing it from my viewport while displaying this other widget? So that my new widget will act as kind of a pop-up.

Hi rimau!

looks like i finally found a question i can answer :slight_smile:
This is the way i would do it (there is probably a better way to do it, but it works)

In your additional widget, add a background image that completely covers the screen.
This also gives you the possibility to make this image half-transparent with a nice fade-in effect.

Hi

This is denifinitely one way to do it. I was thinking about this solution as well. And regarding the lack of other ideas it sems there is no more elegant (via designated blueprints node) way. I will go with this solution probably, as I can’t figure out a better one, but I will leave the question open, maybe some other ideas will emerge. Thanks for your response :slight_smile:

Hi, this is an old question but “remove from parent” doesn’t delete a widget it just removes it from the screen and essentially places it into the background. So unless you are changing levels (which destroys all active things in memory) the widgets are still there. What I would do is on the game instance or some other object that is persistent in the level like maybe the game mode or something – is to when that widget is created to promote it to a variable and store the reference. From there you can activate or deactivate the widget as you need without having to recreate it (until a map change of course).

Additionally, if you didn’t create a reference but are trying to communicate to a widget that has been deactivated, you can use the “get all widgets from class” and uncheck the “is on top” box. Of course, don’t use this on a Tick event or it’ll bog things down.