Hit-testing cursor over screen elements
🖼️ Rendering•Updated 2 days ago•0 views
pos = render.cursorPos(player()) returns cursor pos in screen space - check it against your element's rect (e.g. 0<x<512 and 0<y<80); condense into a function.
Best way to check if the cursor is over a HUD/screen element
pos = render.cursorPos(player()) returns cursor pos in screen space - check it against your element's rect (e.g. 0<x<512 and 0<y<80); condense into a function.