View Single Post
01-14-19, 05:48 PM   #8
Leaker
A Murloc Raider
Join Date: Jan 2019
Posts: 6
Originally Posted by myrroddin View Post
If your display, or if writing a public addon, the user's display, is greater than 1920x1080, you need to do two things:
  1. Set the CVar scale to 768/height
  2. Set UIParent's scale to 768/height
This is because WoW won't let you set a CVar scale lower than 0.64 which won't look correct on monitors with a resolution greater than 1080p.

If the height is equal to or less than 1920, only do the first thing. Now here are the hard parts:
  1. Scale your frame initially by the above scale, in which it will look tiny with unreadable text.
  2. Increase the height and/or width of the frame until it looks good, but leave the scale alone.
  3. As mentioned, you need to place your newly scaled frame on an even pixel, unless that isn't centered. You'll have to figure that out frame by frame.
  4. Assuming you let the user set a scale, which is a bad idea at this point, wrap your "user scale" instead in height or width adjustments providing the illusion of scaling up or down. A better idea is to not provide a scaling option and go straight for height or width.
  5. Place the adjusted frame again so it sits evenly.
I am also interested in creating a pixel perfection, but having difficulties with fully understanding your method as a newb developer

If you don't mind, could you please provide me some working example?

My current screen resolution is 1920x1080, but am not willing to limit this to such.

Many thanks!
  Reply With Quote