Quote:
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") 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. |
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
|
Quote:
|
Quote:
|
Quote:
You can try with my modification as well: Code:
local mult = (768/string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))/GetCVar("uiScale") I agree that Saiket's code is geared more towards a specific purpose, so it's going to be a little obfuscated. |
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... |
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)? |
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.
|
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. |
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. |
Quote:
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. :/ |
I wasn't aware Dominos had a sexual preference. :rolleyes:
|
Quote:
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). |
Quote:
Wait, does this make me GAY?!? Oh, man! How'm I gonna break this to my girlfriend? |
Quote:
|
Quote:
|
Quote:
Quote:
|
Actually, I'll illustrate:
Quote:
Quote:
|
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
|
Pedantry is not funny.
|
All times are GMT -6. The time now is 08:43 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI