Set widget to be invisible from button press

I have created something similar to the inventory system that is show in the unreal tutorial videos on UMG.

Instead of pressing a key to open my menu I am using left mouse click/left controller face button.

What I am trying to do is to set my widget to invisible once again once I have pressed a button on the UMG, is this possible? if so how?

I have tried toggling it in mycharacter blueprint and it works when making it visible but will only make it invisible if I click away from the buttons.

I’ve tried adding the functionality in my button event but I am unsure on how to reference my menu from inside the button.

yeah is possible

Most helpful… Care to share how?

yes more later i show a video for you how set visibility widget.

Thankyou!

The video is upload wait a minut.

Ready :slight_smile:

Here The Video Link

Hi, Thank you , I appreciate the time you have taken to make this, but I think you misunderstood or maybe I did not explain it too well.

I can get that result with the above blueprint by attaching a keyboard key to it, the flipflop with alternate between visible and hidden. I have a button in a widget which can be placed inside my gamehud widget. I am trying to set visibility of my gamehud from within that button event.

I’ve just had a play around and I can get it working from within my gamehud widget by setting an event for each button.

The answer was so simple in the end, I can’t believe I didn’t think of it.

50045-materialbuttons.jpg