Thread Tools Display Modes
06-22-10, 07:38 AM   #1
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
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:

Originally Posted by TravisWatson View Post
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?
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
06-22-10, 04:14 PM   #2
Dgrimes
A Black Drake
 
Dgrimes's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 89
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.
__________________
What was is, what will be was.
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » Pixel Perfect possible on RDX objects?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off