#How to check if mouse is in UI element

2 messages · Page 1 of 1 (latest)

obsidian drift
#

The built in entered and exited functions also trigger when you hover over a sub element of the UI, I could hack together my own solution but I feel like there should be something built in for this

proper hazel
#

You can check the mouse position against the rect of the element.

Maybe changing the mouse filter to ignore on the element that should not trigger also works / or stop on the above element (but not sure if this affects enter/exit signals out of my head).

If you care about visual feedback on hover use a button with configured styles for normal & hovered.