Quantcast

* Possible fix for taint issues, removed the hacky .bg code for the headers. The insets of the backdrop may need to be adjusted.

James Whitehead II [01-29-08 - 19:37]
* Possible fix for taint issues, removed the hacky .bg code for the headers.  The insets of the backdrop may need to be adjusted.
Filename
PerfectRaid.lua
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