Make Widget inactive when child widget is active

Hi, UE beginner here

I’m working on a mouse-driven UI, and I have a level with a widget that has an exit button that pulls up an exit menu. When the user clicks the exit button, the user can still click and interact with the UI elements on the parent widget. However, I’m trying to make it where they cannot be interacted with (clicked etc)

I’ve tried input mode and mouse focus/capture, but nothing seems to be working. Any tips?

Generally, it would be enough to set the Visibility of the menu in the background to Not Hit Testable as soon as the new menu appears.

Or make just the panel housing the background widget Not Hit Testable. So you can still interact with the panel that has the pulled up menu.

You can use a [Set Is Enabled] node with the entire widget as a target.

The problem with disabling is that will change the state of buttons to Disabled which changes the way they look.

Setting the visibility worked! Thank you for your response.

I also tried Tuerer’s approach which did change the look of the buttons, as you mentioned. Decided to go with your method.

I’m not sure how to make the panel housing the widget Not Hit Testable. Is a cast involved? Would you mind describing that a bit more?

Follow up question:

How do I set the visibility back to the parent widget when the exit menu is closed? :slight_smile: I’m messing around with Get Parent → Set Visibility (visible) → Remove from Parent when the cancel button is pressed on the exit menu

No need to cast. A panel is any widget that can have another widget inside. For example, I have a border with some text:

309635-annotation-2020-08-09-165109.jpg

When I click the button, I flip the visibility of the border:

When it’s set to Not Hit-Testable, nothing can interact with (and / or its children). When I click again, I restore the Visibility.

Image from Gyazo

I don’t know how you organised your widgets. If it’s all part of the same widget, there’s no need for any of this. You can simply show / hide the extra menu.

Then make all elements not hit testable apart from that button. Rather than making the entire widget NH-T, apply this setting just to the panel you no longer wish to interact with, leaving the button as it was.

Obviously, the button cannot be a part of the panel you’re disabling hit testing against.

Thank you, your answers are helpful. Although I’m not sure I can follow that same approach as the button to open the exit menu would be unable to be interacted with while the exit menu is open. Here is the setup I have in my widgets

This seems to give me the behavior I want. I’m not too comfortable with using Get All Widgets of Class like this, but I will only ever have one of them so I think it’s ok.

Thank you for all your help