Toggle Main Menu visibility

Hello all, still a complete noob here… (just started playing with UE about a month ago) so please be gentle.

A little bit of the back story of what I’m trying to make…
I built a Main Menu UI widget. Inside it I thought it would be cool to put an option that would display the actual FPS in the game just like UE shows it when enabling it in the editor.
I added a checkbox to toggle it… never got it to work, because I stumbled upon another issue.
The checkbox status is set to a bool variable which gets set on status change.
I realized that my Main Menu was created with create widget → add to viewport and closed with remove all widgets (or remove from parent… does not matter in this case). Which meant, and correct me if I’m wrong, that every time the menu is rebuilt the checkbox gets it’s status reset.

So I began modifying the way the Main Menu is built.
On Event Begin Play I create the widget and display it.

I nested 2 main items in it: PauseMenu which has its visibility set to Visible by default and SettingsMenu which is Hidden by default.
There are 3 options on both items: Play, Settings, Quit.

PauseMenu:
Play - hides the PauseMenu and unpauses the game -> works ok
Settings - hides PauseMenu and enables the SettingsMenu -> works ok
Quit - exits the game, works ok

SettingsMenu:
Play - hides the SettingsMenu, unpauses the game -> works ok
Settings - is highlighted but no action tied to it.
Quit - exits the game

All nice and dandy so far…

I created an Input Action for the ESC key so that the menu can be displayed when the key is pressed by the user.
Tested and it works if I create the main menu widget and add it to the viewport.

However if I try to use it for just toggling the visibility it doesn’t.
In the Level BP I created 2 functions:

CreateMainMenu - which creates the widget and adds it to viewport on Event Begin play.
ShowMainMenu - which I’m trying to bind to my Input Action set up for the ESC key.

I have attached some screenshots for reference.

The ShowMainMenu function seems to be working as the game does get paused and the mouse cursor is displayed but the Set Visibility node is completely ignored.
The PauseMenu variable is of type MainMenu and is promoted from the creation of the widget

Perhaps my logic is totally wrong and I have to scrap everything… but shouldn’t this work???
I’ve been pulling my hair out for 3 days straight.

Any help is greatly appreciated.
Thanks and have a great day!

Go into your Designer tab for the MainMenu widget. For each of the things you have placed in the PauseMenu and SettingsMenu, click on the item and verify that, in the details tab, visibility is set to Visible by default.

Hey KelbyVP,

Thanks for taking the time to reply. I double checked every single item in PauseMenu and SettingsMenu and visibility is set to Visible for all :frowning: