Detect whether the mouse is over UI