How to detect mouse is over any Widget?
I have a main GUI widget and many child widgets and I set my input to InputModeGameAndUI. However whenever I click on a readonly-textbox (like the chatbox) or on the inventory, my character also receives this as input and starts walking.
It get's more complicated with widgets that are not rectangular (like a widget with a border for the background but the image is circular and etc) and some also have drag&drop functionality.
How is this best solved?
There is a node called Is Hovered, which returns a boolean with true if the current widget is hovered.
answered Nov 25 '17 at 03:20 PM
in my opinion "IsHovered" is a little buggy. look when bIsHovered flag is set:
this means that if you fire an "OnMouseEnter" and, for example, change your mode to "GameOnly", move the mouse outside widget area and then switch back to the "UIOnly" or "GameAndUI" modes, even if mouse is outside the widget, this still result as hovered. and there is no way to turn manually that "bIsHovered" flag back, because it is not exposed in blueprint...
answered Feb 23 '18 at 01:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here