mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-08-03 11:29:22 -04:00
FrameXML's coordinates are not pixels. The interface is authored against a virtual screen 768 units tall, so a 232x100 frame is meant to be the same apparent size on every display. Treating those numbers as pixels drew the whole thing at half size on a 1528-tall window and would draw it at double on a 384-tall one — wrong differently on every system. The tree lays out in units and the renderer multiplies by the scale on the way to the screen, which is the one place the two meet. The cursor makes the same trip in reverse, because hit testing unconverted pixels would miss every frame by exactly that factor. GetScreenWidth and GetScreenHeight answer in units too, since that is what FrameXML means by them: 768 tall on any display, so a frame sized against the screen comes out the same size on all of them.