View Single Post
09-15-11, 07:57 AM   #2
ALZA
A Deviate Faerie Dragon
 
ALZA's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 19
Nameplates are children of WorldFrame, not UIParent. So they're not affected by UIScale. Scaling WorldFrame or every nameplate is not an option also - it affects the position of frame. One way to "normalize" all sizes to be pixel-perfect looks like this:

Code:
local fix = 1
if(IsLoggedIn()) then -- in case we are back from /reload and not actually logging
	fix = GetCVar"UIScale"
else
	local fixframe = CreateFrame"Frame"
	fixframe:RegisterEvent"PLAYER_LOGIN"
	fixframe:SetScript("OnEvent", function()
		fix = GetCVar"UIScale"
	end)
end
So setting a size, position or offset will look like:

Code:
border:SetPoint("TOPLEFT", -1 * fix, 1 * fix)
  Reply With Quote