WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   OpenRDX: Community Chat (https://www.wowinterface.com/forums/forumdisplay.php?f=107)
-   -   Pixel Perfect possible on RDX objects? (https://www.wowinterface.com/forums/showthread.php?t=33325)

unlimit 06-22-10 07:38 AM

Pixel Perfect possible on RDX objects?
 
I should post this for reference:

http://www.wowinterface.com/forums/s...ad.php?t=31813

These are the codes I was going to add to my autoexec, but I'm not certain if they'll work (have to wait for servers to go back up)

Code:

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

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

basically, the idea is that it makes your UI "Pixel Perfect". Pixel perfect means:

Quote:

Originally Posted by TravisWatson (Post 186024)
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 was thinking that I could, for example, create a frame (in this case, let's just say the "Base" frame), that is 20 in width and 5 in length.

Would it be possible, after adding the "scale" function to my autoexec, to type scale(20) and scale(5) in the field instead of just numeral 20 and numeral 5, and gain the same result?

Dgrimes 06-22-10 04:14 PM

I'm pretty sure that it doesn't work that way as you are creating a function that the object editor won't be able to see. If you were to manually edit the object editor file to incorporate said function you could also add a check box that will tell it to use the "Pixel Perfect" amount instead.

Another way you can do it is to have your autoexec file automatically re-adjust the width of any of the features you want to be pixel perfect by using the RDXDB.GetObjectInfo() (I think that is the function to call) and then changing the table values using the scale() function.

Editing all the objects via the autoexec will require more code as you have to get the information of all the features you want to change.

If you do plan on editing the features to incorporate the scale() function you will need to edit all the files that have features that support editing the width and height. It might be daunting at first but it will go by rather quickly after you get the first one done.

When and if changing the lua files to incorporate the scale() function I would suggest just adding a check box that will turn it on or off. If it is called to be on have it do the scaling in the back end instead of the user having to write out "scale(20)" as it will just add further confusion if it was required to write it out.

Hope this helped.


All times are GMT -6. The time now is 05:21 AM.

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