View Single Post
11-21-13, 10:32 AM   #19
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
Originally Posted by myrroddin View Post
If I understand correctly, you are creating an user interface that will work on any resolution, correct? In that case, you need to also factor in GetEffectiveScale() ... Which Phanx pointed out in some of my code.

The reason you need to know the UI scale is because while I use the lowest UI scale, Frank uses the highest, and Sally uses something in the middle.
at this time, i am scaling their screen for them.

in this case...
Lua Code:
  1. local aspect = CreateFrame("Frame", nil, UIParent)
  2.         aspect:RegisterEvent("PLAYER_ENTERING_WORLD")
  3.         aspect:SetScript("OnEvent", function(self, event)
  4.             UIParent:SetScale(0.6)  -- you can change the scale here but you will break the entire add-on --
  5.             aspect:UnregisterAllEvents()
  6.         print ("Your Resolution Scale has been changed to 0.6")
  7. end)

i notify them that i have changed their scale.

it is set by hard code to 0.6, in the future i may change this, but for now, i think i may hold steady on this... from what i can tell, the pixle ratio is very clear at .6, where as in other scales near that, they seem to distort the graphics
  Reply With Quote