GUI Button to screen coordinates

Would you please provide a PG next time you asking a question? It’ll help to avoid misunderstanding of your problem.

So if your GUI is on a plane the control coordinates are relative to that plane so you just need to add screen cordinates of that plane to the coordinates of the control. You won’t need that funky piece of code at all.

getClientRect function source:

extent source: