From 33cd3b9b23053f558c285d773c53abc3e2850095 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Tue, 29 Jan 2008 19:37:10 +0000 Subject: [PATCH] * Possible fix for taint issues, removed the hacky .bg code for the headers. The insets of the backdrop may need to be adjusted. --- PerfectRaid.lua | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/PerfectRaid.lua b/PerfectRaid.lua index ec519e7..4c75930 100644 --- a/PerfectRaid.lua +++ b/PerfectRaid.lua @@ -204,13 +204,10 @@ function PerfectRaid:CreateRaidFrame(idx) local frame = getglobal(name) if not frame then - local bg = CreateFrame("Frame", nil, UIParent) - - frame = CreateFrame("Frame", name, bg, template) + frame = CreateFrame("Frame", name, UIParent, template) frame.title = frame:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall") frame.title:SetPoint("BOTTOM", frame, "TOP", 0, 3) - frame.bg = bg frame.backdrop = { bgFile = "Interface\\AddOns\\PerfectRaid\\images\\bgFile", @@ -255,27 +252,20 @@ function PerfectRaid:CreateRaidFrame(idx) end -- Position backdrop - local bgtopoffset = 6 - bgtopoffset = bgtopoffset + (options.title and 20 or 0) - - frame.bg:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, bgtopoffset) - frame.bg:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 0, -5) - frame.idx = idx frame.title:SetText(options.title or "") if options.disabled then frame:Hide() - frame.bg:Hide() return end if options.hBackdrop then - frame.bg:SetBackdrop(frame.backdrop) - frame.bg:SetBackdropColor(0,0,0,.7) - frame.bg:SetBackdropBorderColor(0,0,0,.7) + frame:SetBackdrop(frame.backdrop) + frame:SetBackdropColor(0,0,0,.7) + frame:SetBackdropBorderColor(0,0,0,.7) else - frame.bg:SetBackdrop(nil) + frame::SetBackdrop(nil) end local yoffset = options.alignbottom and 1 or -1 @@ -308,9 +298,7 @@ function PerfectRaid:CreateRaidFrame(idx) frame.initialConfigFunction = PerfectRaid.ConfigureButton frame:SetMovable(true) frame:SetClampedToScreen(true) - frame.bg:SetScale(options.scale) frame:Show() - frame.bg:Show() self:RestorePosition(name) return frame end @@ -581,9 +569,6 @@ function OnAttributeChanged(frame, name, value) if parent.title then parent.title[method](parent.title) end - if parent.bg then - parent.bg[method](parent.bg) - end else parent.title:Show() end -- 1.7.9.5