How to detect if the mouse is over the UI?

In the widget override onMouseEnter and set game mode to UI only, in the same widget onMouseLeave sets the game mode back to Game&UI. If that’s not enough, dispatch a bool on widget Enter/Leave to prevent/allow game world interaction.