What parts of an addon's GUI should be "pixel perfect"?
View Single Post
10-16-17, 09:56 PM
A Pyroguard Emberseer
Join Date: Oct 2008
To be clear about something, no matter what your frame's scale, if your frame is 500 x 600 pixels (or whatever height and width you are using) and you apply a scale, the frame is still 500 x 600. Scaling does not change the number of pixels used, only the render size.
This is because your monitor only has a set amount of pixels, 1920 x 1080 on my 1080p screen. If I set the scale of either my entire UI or an individual frame (that may or may not have child frames), the number of pixels on my monitor never change.
Setting a scale on a parent frame will affect the child frames by the exact same scale automatically.
The CVars to enable manual scaling and setting the game's scale is mostly only used by full UI replacement addons. Some time ago I tried an experiment. First, I set the built-in scale for the game to 1, which rendered all the default frames like the minimap and user frames a bit larger than I had previously, because the game had guessed my scale as less than 1.
Then I created a test frame and set its scale to 1. Next I changed the game's scale to 0.75 and my test frame and built-in frames rendered 25% smaller. I then reset the game's scale back to 1, and directly changed the test frame scale to 0.75.
What do you think happened? The test frame at 0.75 directly was rendered smaller than game scale 0.75 and test frame of 1.
Lastly, I did both, and the test frame became 0.75 of 0.75.
All that said, my test frame was still 400 x 400 and no matter what scale was set where, it was always dead centre of my screen because that is where I told it to render via SetPoint. If I had any child frames set at decreasing 25 height/width intervals until 25 x 25 and told them to be in the centre of the test frame, then that is exactly where they would stay no matter what scale the parent frame would be.
So again, no matter what your scale is for any UI element or frame, the number of pixels for both your screen and your element never change because that is mechanically impossible. The monitor you are using has a set number of pixels based on whether it is 720, 1080, 4K, or something else. You cannot change the number of pixels and scaling has absolutely zero effect on the number of pixels.
Scaling is only, repeat, only, changing the render size.
View Public Profile
Send a private message to myrroddin
Visit myrroddin's homepage!
Find More Posts by myrroddin