Problem with my inventory system

Hi there,

I’ve created a small inventory system using UMG which I can call with right mouse click. When I right click again, it disappears. Everything works fine so far. What I want to do now is to let it also disappear as soon as the cursor is not hovering my inventory (widget) anymore.
Is there a way to check if my mouse cursor is still hovering the widget?

Thanks a lot for helping me.

Yes, every UWidget has a property “isHovered.” Just drag a pin out from the widget reference and search for “hovered.” Unless I forgot what it’s actually called, you should be able to find this property. It should also be under “variables” with context sensitive turned on, so scour that if isHovered isn’t what it’s called.

At every interval you can check to see if isHovered is still true, and if it isn’t then you can get rid of it.

Take a look at the UMG events “Mouse Enter” and “Mouse Leave”.

Thanks a lot, this was exactly what I was searching for!
I have found “isHovered” under “Widget” with context sensitive turned off.