hi
so i have created a list of objects as buttons, then when i click on one of them, it creates a new widget based on that button. Problem is, the one in the background(the parent) is still clickable.
How can i remove the ability to click on the parent while the child is active?(and then return the power to the parent once i close the child)
Let’s say you create your widget in the ThirdPersonCharacter. This would work with CreateWidget and then AddToViewport. In this AddToViewport node there is an option called ZOrder. By changing this order you can set which widget lays on top of the other and therefore is the one you want to be clickable. Another solution would be that when you add your new widget you set your old/parent widget to disabled by changing its IsEnabled status. Or you use a WidgetSwitcher. Example:
I have 3 seperate widgets:
Main Menu
Options
Controls
The problem: They are seperate. How can I put them together and keep their functions. Solution: I create a new Widget called MenuSwitch_W. So now I have 4 sperate widgets. In my MenuSwitch_W I create a WidgetSwitcher panel and scale it to the size of my widget. Now I add my seperate widgets 1,2 and 3 to this WidgetSwitcher in the Designer from UserCreated on the left side. The order in which they appear as childs of my WidgetSwitcher shows their index (I renamed them with 0,1 and 2 to make it clearer).
So now I have a reference to my MenuSwitch_W. With this reference I can now set the index of my WidgetSwitcher in MenuSwitch_W using the buttons I create in those seperate widgets. In my MainMenu_W I have two buttons(as you can see in the picture above): Options and Controls. The EventGraph for my seperate MainMenu_W looks now like this:
Those buttons change the index to 1 or 2 and tell the WidgetSwitcher to use this index and show the correct widget. In the other two widgets I have only a Back button which changes the index to 0 (MainMenu_W).