Assistance using Event on Removed from Focus Path

Hi everyone,

Still pretty new to Unreal Engine after a few months of study/practice. What I’m trying to do is have an inventory window that spawns custom widget buttons for every item in the inventory that when clicked will spawn a custom action menu pertaining to that button (Equip, Use, Discard). My problem at the moment is that the custom action menu widget persists when I click a different inventory item button. As long as I click within the same button the behavior I desire works correctly where it will relocate/make visible the custom action menu widget at the mouse location.

Example of custom action menu widget spawned.

Example of undesired behavior.

I’ve read on another thread (Sorry I can’t find it right this moment as I’ve been looking for the last couple of days on this topic) where the user wanted to have a widget disappear when they clicked out of it and it was advised for them to use the Event on Removed from Focus Path.

I’ve placed this event in my custom action menu widget but nothing seems to happen when I click another button (as seen in the undesired behavior screenshot above).

Does anyone have any other suggestions on how I can achieve the desired outcome of the custom action menu widget disappearing (hiding) when I click anywhere but on the custom action menu widget?

I ended up changing the way I displayed the equip/discard buttons and not using the Item Action Menu I created but came back to say that I figured this problem out when I ran into it again in another part of the inventory system (Prompting users how many of that item they’d like to discard).

The solution I’m using is when spawning the widget I make sure that it is focusable using the “Set is Focusable” node for the widget. In addition I then used the “Set User Focus” node to make sure the user focus is on this widget and it is indeed in the Focus Path.

For the “Event on Remove from Focus Path” I had to make no changes, I just set the visibility to collapsed instead of hidden (this should have no different effect as far as I’m aware of besides collapsed does not take up space).

Upon clicking anywhere now that is not the widget spawned, the widget visibility is now changed to collapsed and this should serve as a resolution to my original question :slight_smile: