Quantcast WoWInterface - View Single Post - Pixel Perfection for Specific Resolution
View Single Post
04-11-10, 08:50 PM   #18
A Chromatic Dragonspawn
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 152
Originally Posted by TravisWatson View Post

What am I missing here? This is exact code from Saiket. From the looks, it blatantly ignores scale. (It should scale with the map, but it doesn't)

This is exactly what I'm trying to get at... I don't want to do this AFTER I create my UI, I want to do it BEFORE everything gets set up at an improper resolution for one of 2 purposes:
  1. Creating a custom UI for myself or for a UI Pack.
  2. Creating an addon. When I design web pages, I create for 1:1 pixels in my images and browser. If they user chooses to scale, that's their option, but my optimization is 1:1. Why would you not optimize my WoW addon font sizes and textures the same way? Do you have some other suggestion for best practice?

If an addon developer runs at a UI Scale of 2 and optimizes font sizes, etc for that, it's going to look like hell for someone with a default of 0.9 (no ui scale).

And by using the UIScale method when setting up my custom UI or pack, I'm making every addon pixel perfect, not just some random one that I'm creating. This goal isn't to create one pixel perfect addon, but an entire pixel perfect UI regardless of the addons I use. I really believe we're talking about two completely different problems. Hopefully you'll see my intents now.

Again, you're completely misunderstanding the purpose of this thread. Although I think the method presented could possibly be useful in rare situations, like I showed it clearly ignores scale, and I strongly disagree with this implementation other than very rare situations (1 pixel borders, for instance).
The test code doesn't parent to UIParent, and I can't remember if I set it up to account for UIParent's scale even if you did reparent the pyramids. It only shows the mapping between UI units and pixels. If you want to scale things, you're welcome to do that math. There's no magic to UIScale.

I'm still not entirely sure what you want, or what you don't want. If you want everything pixel perfect, you must either use the uiScale method or hook every SetPoint operation in the API. If you want only your mod to be pixel perfect, position your frames using the formula in my test code.
  Reply With Quote