Hi folks,
I'm trying to make a dialog box with controls and I'm not grasping the coordinate system. Can anyone help straighten my brain?
The following image documents the testing that I did. I created a 0.5f x 0.5f GuiPanel with center pivot. The GuiImages are children of the GuiPanel. In all 4 tests, the elements remained the same. Positive X/Y coords, relative=false. Only the pivot was changed. The icons are at 2px, 50px and 100px from the anchor point.
I see here that the anchor point is relative to the bottom-left of the GuiPanel and that positive coords send the image up/right in all cases. From having dug through the threads here, I expect this is "working as intended" as that's the way that OpenGL does it.
I want to put (for example) the close button at the top right of the GuiPanel. If I could anchor it to the top right and come in just 2px X and Y, I could position it where I need it. I don't want to use relative coords as they're imprecise. I can't just say "200px from the bottom/left" because I don't know how big 0.5f is on your screen.
What am I missing?
Thanks,
Trevor