WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Tutorials & Other Helpful Info. (https://www.wowinterface.com/forums/forumdisplay.php?f=12)
-   -   Pixel Perfection for Specific Resolution (https://www.wowinterface.com/forums/showthread.php?t=31813)

TravisWatson 04-11-10 09:49 AM

Pixel Perfection for Specific Resolution
 
This post has been updated per Haleth's information below. Thanks Haleth!

I came across an issue I didn't like while designing my UI: in-game pixels were not "real" pixels. They were close, but not exactly. So sometimes textures/borders/etc would get fudged when WoW scales up from its in-game resolution to your monitor's resolution.

The solution is to manually set the uiscale CVar (which just stores the value from this slider in the Video Options).

Here's the quick'n'dirty macro line:

Code:

/run SetCVar("uiScale", 768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))
Here's the explanation and longer more hands-on method:

To calculate the value, you need your resolution height (mine was 1050 for a 1680x1050 resolution) and need to know the game's height is always (?) 768. You can verify that your in-game height is 768 by running the following lines:

Code:

/console useuiscale 1
/console uiscale 1
/run print(GetScreenHeight())

Your UI scale is the ratio between your actual resolution and the in-game resolution. For me, it's:

Code:

768 / 1050 = 0.731428571
/console uiscale 0.731428571

NOTE: The minimum value is 0.64. Below 0.64 will not work!

You can see what your resulting size is by:

Code:

/run print(GetScreenWidth(), "x", GetScreenHeight())
And there you have it, the exact resolution of your monitor (within floating point accuracy) to work with when designing your UI. Since we were modifying a CVar, this will save across sessions.

Disclaimer: This is possibly/probably a bad idea if you plan to package your UI. I use it only for my own UI.

Gsusnme 04-11-10 10:04 AM

I too have noticed "fudging" or "blending" with my UI but I always simply thought of it as a limitation of the UI overlay, thanks so much for this! Now my OCD is satiated.

TravisWatson 04-11-10 10:08 AM

@Gsusnme, Glad I could help! Indeed it was also my OCD that led me down this path! ;)

Haleth 04-11-10 10:30 AM

It's much easier if you just do:

/script SetCVar("uiScale", 768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))

TravisWatson 04-11-10 10:42 AM

Quote:

Originally Posted by Haleth (Post 184564)
It's much easier if you just do:

/script SetCVar("uiScale", 768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))

Ha, I didn't even look at the height! Had no clue that it always sets that value to 768. Good call! Will this always be the case? Is 768 *always* the base height?

Haleth 04-11-10 10:55 AM

Quote:

Originally Posted by TravisWatson (Post 184567)
Ha, I didn't even look at the height! Had no clue that it always sets that value to 768. Good call! Will this always be the case? Is 768 *always* the base height?

Yes, afaik the WoW screen height is always 768.

nightcracker 04-11-10 11:38 AM

UI Scale is one way, but when I'm making an addon, I can't set the users UI scale to my value. So I have to make a workaround. If I scale any value with the following function, there comes out the value needed to represent the amount of "virtual pixels" needed by the frame to get the amount of "real pixels".

Code:

local mult = SetCVar("uiScale", 768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))/GetCVar("uiScale")
local function scale(x) return mult*x end

someframe:SetHeight(scale(10))
someframe:SetWidth(scale(10))

I implemented this method in TukUI and ncUI to get them both pixelperfect.

Saiket 04-11-10 01:28 PM

If you don't want to override the user's uiScale, you can use the following code to position a frame on real pixel boundaries: http://pastey.net/134131

It includes some test code that renders pixel-wide nested borders. The top one in this screenshot is adjusted, the bottom one isn't.

nightcracker 04-11-10 01:34 PM

Quote:

Originally Posted by Saiket (Post 184587)
If you don't want to override the user's uiScale, you can use the following code to position a frame on real pixel boundaries: http://pastey.net/134131

It includes some test code that renders pixel-wide nested borders. The top one in this screenshot is adjusted, the bottom one isn't.

Hence my above post :rolleyes:

One problem though, neither GetCVar("uiScale") or UIParent:GetScale() return values instantly, you'll have to hook an event like PLAYER_ENTERING_WORLD(I don't know the first event that they are available, I do know that they are available at PLAYER_ENTERING_WORLD).

Saiket 04-11-10 01:56 PM

Quote:

Originally Posted by nightcracker (Post 184588)
Hence my above post :rolleyes:

One problem though, neither GetCVar("uiScale") or UIParent:GetScale() return values instantly, you'll have to hook an event like PLAYER_ENTERING_WORLD(I don't know the first event that they are available, I do know that they are available at PLAYER_ENTERING_WORLD).

Since GetScreenWidth() is already scaled by the current uiScale, GetScreenWidth() * UIParent:GetScale() is constant no matter what uiScale is set to.

nightcracker 04-11-10 02:47 PM

Quote:

Originally Posted by Saiket (Post 184591)
Since GetScreenWidth() is already scaled by the current uiScale, GetScreenWidth() * UIParent:GetScale() is constant no matter what uiScale is set to.

I'm saying, there is no way to get the UIScale before VARIABLES_LOADED(I think).

Recluse 04-11-10 03:09 PM

Do any of these methods take into consideration using windowed mode (sans Maximized option)? I ask because, say your Windows desktop resolution is 1024x768. If you run WoW at 1024x768 in a non-maximized windowed mode, the actual resolution is a bit lower due to the WoW window's borders, title bar, and even the task bar.

Saiket 04-11-10 03:35 PM

Quote:

Originally Posted by nightcracker (Post 184593)
I'm saying, there is no way to get the UIScale before VARIABLES_LOADED(I think).

Even before VARIABLES_LOADED, UIParent:GetScale() returns 1 and GetScreenWidth() returns a value scaled to 1. No matter when its run, the product of those two will be the same.

Quote:

Originally Posted by recluse (Post 184595)
Do any of these methods take into consideration using windowed mode (sans Maximized option)? I ask because, say your Windows desktop resolution is 1024x768. If you run WoW at 1024x768 in a non-maximized windowed mode, the actual resolution is a bit lower due to the WoW window's borders, title bar, and even the task bar.

Since there's no way for a mod to know how big the window is, or where it's positioned on-screen, that can't be done.

nightcracker 04-11-10 03:36 PM

Quote:

Originally Posted by recluse (Post 184595)
Do any of these methods take into consideration using windowed mode (sans Maximized option)? I ask because, say your Windows desktop resolution is 1024x768. If you run WoW at 1024x768 in a non-maximized windowed mode, the actual resolution is a bit lower due to the WoW window's borders, title bar, and even the task bar.

Resolution is virtual in this context, even if you play at windowed mode REALLY small, it still counts as 1024*768.

TravisWatson 04-11-10 06:12 PM

Quote:

Originally Posted by nightcracker (Post 184573)
UI Scale is one way, but when I'm making an addon, I can't set the users UI scale to my value.

I guess I should have been clear, I did not intend to create a standalone addon that modified the UI Scale. My whole purpose was to set my overall resolution for every addon to use, while maintaining my screen resolution so that everything looks pixel perfect and I can create my custom textures more easily. The way this should be used for addon creators is to create their addons/ui packs in a precise and realistic environment, which is in my opinion when the number of pixels you're working with is identical to your native resolution.

In fact, if I understand what you guys are doing here, I highly disapprove. It looks like you guys are making your addons ignore the UI scale... and in my opinion, this is a terrible idea! This is not what I had in mind AT ALL. Your addons should never ignore a user's UI scale. If I found one that did, I would probably promptly trash it.

Please correct me if I misunderstood what this code is doing.

Waverian 04-11-10 06:17 PM

It doesn't ignore the scale. It just (optionally, per element) multiplies the value of a real pixel so that it fits the size of a full ui pixel and won't be anti-aliased.

Both solutions are acceptable, but the fact is not everybody is going to have their UI set to this scale. Also, just as importantly, changing the UI scale modifies your entire UI. When switching to a normalized UI scale I had to drastically modify every individual element of my UI to be ~20% smaller and in a position to match the old.

If I'm releasing an addon that requires pixel-perfect borders, should I tell all of my users to change every UI element's scale and position, or should I emulate the value of a pixel in my own UI and leave everything else alone?

I'd always choose the latter.

TravisWatson 04-11-10 07:29 PM

Quote:

Originally Posted by Waverian (Post 184608)
It doesn't ignore the scale.



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)

Quote:

Originally Posted by Waverian (Post 184608)
Both solutions are acceptable, but the fact is not everybody is going to have their UI set to this scale. Also, just as importantly, changing the UI scale modifies your entire UI. When switching to a normalized UI scale I had to drastically modify every individual element of my UI to be ~20% smaller and in a position to match the old.

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.

Quote:

Originally Posted by Waverian (Post 184608)
If I'm releasing an addon that requires pixel-perfect borders, should I tell all of my users to change every UI element's scale and position, or should I emulate the value of a pixel in my own UI and leave everything else alone?

I'd always choose the latter.

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).

Saiket 04-11-10 08:50 PM

Quote:

Originally Posted by TravisWatson (Post 184610)


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.

TravisWatson 04-11-10 10:03 PM

Quote:

Originally Posted by Saiket (Post 184615)
I'm still not entirely sure what you want, or what you don't want.

I want my addons, all of them, to be pixel perfect. I also want to be able to design textures for my native resolution, not some crazy number that WoW decided. I'm not saying everyone wants this, but for me this feels like a very natural way to design a user interface.

I also wanted to suggest a method for addon authors to design a more consistent user interface experience. All too often I see an author that designed his options GUI when his scale was set crazy, and it ends up not blending at all with the rest of the UI components. I'm suggesting that by designing at your native monitor resolution, you can deliver a more quality, consistent experience.

Quote:

Originally Posted by Saiket (Post 184615)
If you want to scale things, you're welcome to do that math. There's no magic to UIScale.

I agree, it's not special, but it was an answer so simple that has bugged the hell out of me for over a year, and I couldn't find another resource on it, so I thought I would post. Hopefully others will find it and appreciate it. For me, if I redesign my UI again (very likely), this is the first step on my list.

Sideshow 04-26-10 02:48 PM

Quote:

Originally Posted by nightcracker (Post 184573)

Code:

local mult = GetCVar("uiScale", 768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))/GetCVar("uiScale")
local function scale(x) return mult*x end

someframe:SetHeight(scale(10))
someframe:SetWidth(scale(10))


You say SetCVar / GetCVar ??? I corrected it to GetCVar / GetCVar
I'll probably lack knowledge, but all scale(1) does is multiply by 1.
So scale(23.124578) is still 23.124578 with this function of yours

TravisWatson 04-26-10 03:24 PM

Quote:

Originally Posted by Sideshow (Post 186019)
You say SetCVar / GetCVar ??? I corrected it to GetCVar / GetCVar

You are incorrect by changing this code to use 2 GetCVars, since there are two arguments in nightcracker's code, and GetCVar only has one argument:

http://wowprogramming.com/docs/api/GetCVar

I also don't agree with nightcracker's original code either (and this may be simply a misunderstanding on my part as well). It seems like the multiplier calculation should only call GetCVar:

Code:

local mult = (768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))/GetCVar("uiScale")
His original code, if I understand it correctly, would override your UIScale Cvar permanently with a fixed value.

Anyways, the premise to this method is finding the reverse multiplier that WoW is using, so it is scaling you one way, and you're scaling it back before you draw, thereby negating effects of both the UI scaling and the "in-game" resolution based off a 768 pixel height screen.

I'm still going to reiterate this warning: using this method will cause the code ignore UI scaling. Use only where appropriate.

For instance, a 1 pixel border ignoring UI scale is fine, as it will stretch to encompass the entire container and still serve its purpose while retaining is pixel perfection. Using it to scale an entire frame will result in the UI enlarged or contracted in comparison to your addon because your addon isn't scaling with everything else.

Sideshow 04-26-10 03:39 PM

Ok, then I can't use the scale function. I'm still not sure which code to actually use then, which would be useful. Probably the stuff by Saiket. But that code is kind of 'littered' :o

TravisWatson 04-26-10 03:41 PM

Quote:

Originally Posted by Sideshow (Post 186027)
I'm still not sure which code to actually use then

If you can explain a little more on what you're trying to do, it would be easier to offer guidance.

Sideshow 04-26-10 03:44 PM

Quote:

Originally Posted by TravisWatson (Post 186029)
If you can explain a little more on what you're trying to do, it would be easier to offer guidance.

My addon has a 1 pixel main frame border, and contains a lot of bars, which are all on 1 pixel distance from the mainborder...

TravisWatson 04-26-10 04:01 PM

Quote:

Originally Posted by Sideshow (Post 186030)
My addon has a 1 pixel main frame border, and contains a lot of bars, which are all on 1 pixel distance from the mainborder...

You can try night's suggestion, but like I said, just looking at the code, it appears as if it's setting the uiScale, which it should not do.

You can try with my modification as well:

Code:

local mult = (768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))/GetCVar("uiScale")
local function scale(x) return mult*x end

someframe:SetHeight(scale(10))
someframe:SetWidth(scale(10))

Once I get off work, I'll test this and investigate a bit further. Anyone else is welcome to provide insight.

I agree that Saiket's code is geared more towards a specific purpose, so it's going to be a little obfuscated.

Sideshow 04-26-10 04:47 PM

Heh, thanks. Have a look at this screenshot. On the topright, you'll see the addon I'm working on.

http://img651.imageshack.us/img651/2...210011038h.jpg

For now, it's always pixelperfect with the manual /run thingy...

nightcracker 04-27-10 07:34 AM

Can anyone give some enlightment on this:

Is there ANY way to get the UI Scale of the user BEFORE any loading progress event(PLAYER_ENTERING_WORLD, VARIABLES_LOADED, etc)?

v6o 04-27-10 08:24 AM

I don't think there is. The default UI waits until it's available (VARIABLES_LOADED) before setting the scale on UIParent but as this happens during the loading screen or loading progress, no one notices the scaling happening.

Sideshow 05-10-10 02:17 AM

I still did not find a suitable solution.

I've looked into the scripts here, the problem is that if you use such a script, the addon does not scale anymore with the UIscale but uses a fixed scale at all times. It also gives a weird effect if your addon IsSizable() and the user tries to resize it....

I think the easiest way is just to tell people to use the manual /run SetCVar() if they want to use an UIscale and not have a problem with pixels.

TravisWatson 05-10-10 12:50 PM

Can anyone who's used this method before successfully share a demo? I too, tried this out and was unable to get it to perform correctly.

What I want to see is a scalable and movable frame whose borders and size always break on "real" pixels rather than in-game pixels regardless of scale or position.

Wella 05-12-10 01:28 AM

Quote:

Originally Posted by TravisWatson (Post 187629)
What I want to see is a scalable and movable frame whose borders and size always break on "real" pixels rather than in-game pixels regardless of scale or position.

Agree.

Also, Dominos is gay for getting pixel-perfect borders, especially with PixelSkin for ButtonFacade. I might try out a different AB mod just because of this. :/

MidgetMage55 05-12-10 03:09 AM

I wasn't aware Dominos had a sexual preference. :rolleyes:

TravisWatson 05-12-10 07:05 AM

Quote:

Originally Posted by MidgetMage55 (Post 187819)
I wasn't aware Dominos had a sexual preference. :rolleyes:

I think I could be gay for Dominos. <3

If you want your whole UI to be perfect, check out the first post in this thread (that includes Dominos if you leave it on 100% scale).

voodoodad 05-12-10 07:11 AM

Quote:

Originally Posted by MidgetMage55 (Post 187819)
I wasn't aware Dominos had a sexual preference. :rolleyes:

mmmmmm... new improved Dominos...

Wait, does this make me GAY?!?

Oh, man! How'm I gonna break this to my girlfriend?

Torhal 05-12-10 02:13 PM

Quote:

Originally Posted by voodoodad (Post 187834)
mmmmmm... new improved Dominos...

Wait, does this make me GAY?!?

Oh, man! How'm I gonna break this to my girlfriend?

Find her a girlfriend?

Wella 05-12-10 02:15 PM

Quote:

Originally Posted by TravisWatson (Post 187832)
If you want your whole UI to be perfect, check out the first post in this thread (that includes Dominos if you leave it on 100% scale).

I said that Dominos was being gay because it seemed to be unaffected by this. Well, to a degree. Whatever.

voodoodad 05-12-10 04:12 PM

Quote:

Originally Posted by Wella (Post 187883)
I said that Dominos was being gay because it seemed to be unaffected by this. Well, to a degree. Whatever.

You see, Wella, most people on this website try to avoid using the term "gay" as a descriptor for things they don't like the visual presentation or functionality of. Instead, we attempt to use language that actually describes what we like or don't like about any given addon or ui. Simply calling something gay is kinda considered old-school (or dare I say, gauche) in this neck of the woods.

Quote:

Originally Posted by Torhal (Post 187882)
Find her a girlfriend?

That's not a bad.... HEY!!!

Torhal 05-12-10 10:30 PM

Actually, I'll illustrate:

Quote:

This is gay.
That phrase relays exactly the same amount of information as:

Quote:

This doesn't work!
...as in, none whatsoever.

voodoodad 05-13-10 05:44 AM

In other words, whenever someone says "gay" because it's shorter than "this is not working correctly, and here's what it's doing wrong...", I say "I can't help you." because it's shorter than explaining that it's working correctly but the user just doesn't know what they're doing. :D

Wella 05-19-10 06:47 AM

Pedantry is not funny.

Petrah 05-19-10 08:39 AM

Quote:

Originally Posted by voodoodad (Post 187945)
In other words, whenever someone says "gay" because it's shorter than "this is working correctly, and here's what it's doing wrong...", I say "I can't help you." because it's shorter than explaining that it's working correctly but the user just doesn't know what they're doing. :D



Have I mentioned lately how good it is to have you back here on the forums? /nods

voodoodad 05-19-10 11:03 AM

Quote:

Originally Posted by Petrah (Post 188482)


Have I mentioned lately how good it is to have you back here on the forums? /nods

If you MISSED me so much, how come I can't PM you???

Oh, and I edited the post you lifted for your new sig... There was a critical "NOT" missing in the middle there, so it makes more sense now. :D:mad:

Petrah 05-19-10 11:08 AM

Quote:

Originally Posted by voodoodad (Post 188499)
If you MISSED me so much, how come I can't PM you???:mad:

:p lol... cuz I'm weetodded and forgot to add you to my Buddy list. That's what happens when you take off for parts unknown for a million years without telling anyone.....

Quote:

Originally Posted by voodoodad (Post 188499)
Oh, and I edited the post you lifted for your new sig... There was a critical "NOT" missing in the middle there, so it makes more sense now.

Feexed eet!

voodoodad 05-19-10 11:17 AM

Quote:

Originally Posted by Wella (Post 188472)
Pedantry is not funny.

I am no pedant, sir. If anything, I am a dilettante!

zohar101 06-29-10 11:32 PM

Quote:

Originally Posted by TravisWatson (Post 184559)
And there you have it, the exact resolution of your monitor (within floating point accuracy) to work with when designing your UI. Since we were modifying a CVar, this will save across sessions.

So...do you have to hit this macro once and that's it or every single time you log in? Cause that would get a little annoying after a while...

Aarokh 06-30-10 01:02 AM

You only have to hit this macro once if you are not switching between window mode and fullscreen mode frequently.

Basically you have to hit it once everytime you change something in your graphic settings (Multisampling for example) and hit apply.

sakurakira 06-30-10 02:04 AM

I have a problem... I read about this "pixel perfection" method a while ago on these forums, but it does not work exactly for all resolutions.

My resolution is 1440x900. When I put in 768/900, the result is 0.85333333333333333 to infinity. I edited my config file so that the scale is uiScale "0.85333333333333". But since it's not an exact number, the resultant UI scale is therefore not accurate, but is only the closest available.

If I use /run print(GetScreenWidth(), "x", GetScreenHeight()) to see the resolution my number gets me, the result is 1439.9999662615 x 899.9999969073.

I set all addons to use 100% scale. The result of all of this is that some of my addons have 1 px borders: my minimap, grid, tooltips, and those look fine. I also have graphic replacements with 1 px borders that sometimes appear smudged.

Any help/adivce?

Wella 06-30-10 04:38 AM

I also have a resolution of 1440x900 and I used Google to work out 768/900 for me. The result was 0.85 follow by seven 3s:

0.853333333

Try this in your command prompt and everything should be fine.

Ailae 06-30-10 05:01 AM

It's still 0.853333.. repeating to infinity. Google just doesn't display it properly.

Wella 06-30-10 05:04 AM

I know what it is, but I used what Google displayed and got a perfect result. The maths here aren't important, he was just asking for a way to solve the problem.

PS: The correct term is 'recurring'. :P

Ailae 06-30-10 05:11 AM

Let's hope those seven 3's are magical enough then. :)

Actually, it's either recurring or repeating - http://en.wikipedia.org/wiki/Repeating_decimal

Catelinelol 07-20-10 10:01 AM

is it possible to ""lock"" the UIScale setting ?? I setup my Interface Pixel Perfect, and any time i change something in the Video settings like view distance etc ... it changes the UIscale after a reload. And no the Config.wtf isn`t locked ;)

jeffy162 09-13-10 10:28 AM

OK, so, I haven't really been following this thread, mostly because what is being discussed I simply can't follow. You've probably heard the expression "It's all Greek to me". Well, I'm no good at foreign languages. That being said:

So, I ran this:
Code:

/run print(GetScreenWidth(), "x", GetScreenHeight())
in my chat, and got this:
Code:

1280.0000179939 x 800.00002924007
back.

Since my monitors resolution is 1280 x 800, I'm guessing this equates to being able to do "pixel perfect" ...... stuff. Oh, I have WoW set to play in windowed mode and maximized. Don't know if that makes a difference.

Talyrius 10-08-10 08:36 PM

Did Blizzard change something with how the UI's resolution is computed in the beta? I'm getting blurry pixel lines using the macro from the first post in the beta. It works perfectly on the live client.

Barjack 10-08-10 09:06 PM

Quote:

Originally Posted by ForeverTheGM (Post 208533)
Did Blizzard change something with how the UI's resolution is computed in the beta? I'm getting blurry pixel lines using the macro from the first post in the beta. It works perfectly on the live client.

I noticed this as well. For some things adding a 0.5 offset fixed it, for other things it didn't seem to. I'm unsure what changed and am not having too much success finding out what since it was always a little voodoo magic that it worked in the first place to my meagre understanding of it. It seemed like maybe on live, certain things would end up "luckily" on pixel boundaries even if you didn't re-adjust everything? But now that doesn't seem to happen? I'm not entirely sure, but something definitely changed.

Talyrius 10-08-10 10:10 PM

Code:

/console useuiscale 1
/console uiscale 1
/run print(GetScreenHeight())

Live:
767.99998249287

Beta:
767.99998249287

It doesn't look like they've changed the way UI resolution is computed, so it must be something else.

Joevluls 10-09-10 08:42 AM

Having a little play around myself also with live to beta changes with the scaling, I can get some things pixel perfect with 8x multisampling on beta, whereas on live they smudge.

Also the 'no-UI scale' scale seems to have changed. Now I'm not sure if I'm looking at this correctly, but without the 'Use UI Scale' box checked on live and beta the numbers I get from UIParent:GetScale() are as follows:

Live : 0.89999997615814
Beta: 0.73142856359482

And also /run print(GetScreenWidth(), "x", GetScreenHeight()) returns different values on live and beta.

I'm running the game windowed, maximized, at 1680x1050.

Live returns : 1365.333381317 x 853.33341730482
Beta returns: 1680.0000326139 x 1050.0000923593

I don't honestly know tho', this scaling stuff is rather confusing to me and does seem to be a bit of voodoo magic.

And also

Quote:

Originally Posted by ForeverTheGM (Post 208546)
Code:

/console useuiscale 1
/console uiscale 1
/run print(GetScreenHeight())

Live:
767.99998249287

Beta:
767.99998249287

It doesn't look like they've changed the way UI resolution is computed, so it must be something else.

For me it's..

Live: 768.00005398167
Beta: 768.00005398167

Haleth 10-09-10 08:44 AM

Got exactly the same problem here - there's a tiny tiny difference in UI scale between live and beta for me. Almost everything looks fine, but some 1-pixel gaps become 2-pixel, and font shadows look messed up.

Hoern 10-09-10 11:26 AM

Quote:

Originally Posted by nightcracker (Post 184593)
I'm saying, there is no way to get the UIScale before VARIABLES_LOADED(I think).

I've played with this in the most recent Cataclysm beta build a little bit, and it might be a fluke or just some sloppieness on my code's side, but the first place I was reliably able to get the data was at PLAYER_ALIVE, not before. ADDON_LOADED I had one in five wrong, VARIABLES_LOADED was one in eight.

sacrife 10-09-10 12:12 PM

I use player_entering_world, works fine as long as you unregister the event afterwards for obvious reasons.


All times are GMT -6. The time now is 12:56 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI