Hi, I’m looking for a function that tells me what (if any) widget the cursor is currently over/hovering. I was pretty sure I had already found something for this some time ago, but either I remember wrong or I can’t find it now.
The goal is to deal with widget-click-events for buttons other than LMB, and maybe some other fancy stuff later.
I could implement OnStartHover and OnEndHover for each GUI-element, so they register and unregister themselves somewhere as the “global hovered element”, to be checked when any RMB/MMB-click events occur. But that doesn’t feel right… All I need is a function to call in a click-event that scans the cursor position for any widgets.
There’s probably some class for this sort of thing, but I don’t know where to look. The player controller doesn’t seem to be it.
edit: it’s probably clear, but I want to get the specific item, of course, not the whole widget.