hello guys, apparently i am having trouble with sizing frames for multiple resolutions...
here is how it is setup....
lua Code:
getscreenheight = tonumber(string.match(({GetScreenResolutions()})[GetCurrentResolution()], "%d+x(%d+)"))
function UIScale()
if C["General"].autoscaleUI == true then
C["General"].uiscale = min(1, max(.64, 768/getscreenheight))
end
end
UIScale()
local mult = 768/string.match(GetCVar("gxResolution"), "%d+x(%d+)")/C["General"].uiscale
local function scale(x)
return mult*math.floor(x/mult+.5)
end
function Scale(x) return scale(x) end
E.mult = mult
function CreatePanel2(f, w, h, a1, p, a2, x, y)
local sh = Scale(h)
local sw = Scale(w)
local sx = Scale(x)
local sy = Scale(y)
f:SetFrameLevel(1)
f:SetHeight(sh)
f:SetWidth(sw)
f:SetFrameStrata("BACKGROUND")
f:SetPoint(a1, p, a2, sx, sy)
f:SetBackdrop(mainback)
f:SetBackdropColor(unpack(C["Colors"].Bg))
if C["General"].classborders then
f:SetBackdropBorderColor(unpack(C["Colors"].Classes))
else
f:SetBackdropBorderColor(unpack(C["Colors"].Border))
end
end
raid = CreateFrame("Frame", "raidframe", UIParent)
CreatePanel2(raid, 359, 147, "RIGHT", UIParent, "RIGHT", -5, -347)
but the sizing isnt the same size/proportion as the resolution its made on.. anyone know what exactly is wrong or what i can do a little different to fix the problem..
note: i make it on a 1440 x 900... and have the scaling+positioning problems with the larger resolutions