Untitled diff

Created Diff never expires
0 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
22 lines
4 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
25 lines
local function UpdateFrameSize(f)
local function UpdateFrameSize(f)
-- set frame size and position
-- set frame size and position
if f.state.minus then
if f.state.player then
f.bg:SetSize(500,100)

elseif f.state.minus then
f.bg:SetSize(FRAME_WIDTH_MINUS,FRAME_HEIGHT_MINUS)
f.bg:SetSize(FRAME_WIDTH_MINUS,FRAME_HEIGHT_MINUS)
else
else
f.bg:SetSize(FRAME_WIDTH,FRAME_HEIGHT)
f.bg:SetSize(FRAME_WIDTH,FRAME_HEIGHT)
end
end


if f.state.no_name and not f.state.player then
if f.state.no_name and not f.state.player then
f.bg:SetHeight(FRAME_HEIGHT_MINUS)
f.bg:SetHeight(FRAME_HEIGHT_MINUS)
end
end


-- calculate point to remain pixel-perfect
-- calculate point to remain pixel-perfect
f.x = floor((addon.width / 2) - (f.bg:GetWidth() / 2))
f.x = floor((addon.width / 2) - (f.bg:GetWidth() / 2))
f.y = floor((addon.height / 2) - (f.bg:GetHeight() / 2))
f.y = floor((addon.height / 2) - (f.bg:GetHeight() / 2))


f.bg:SetPoint('BOTTOMLEFT',f.x,f.y)
f.bg:SetPoint('BOTTOMLEFT',f.x,f.y)


f:UpdateMainBars()
f:UpdateMainBars()
f:SpellIconSetWidth()
f:SpellIconSetWidth()
f:UpdateAuras()
f:UpdateAuras()
end
end