Quantcast

Added an "All Classes" checkbutton that should allow you to easily check/uncheck all of the classes

James Whitehead II [02-05-08 - 14:57]
Added an "All Classes" checkbutton that should allow you to easily check/uncheck all of the classes
Filename
PerfectRaid_Frames.lua
diff --git a/PerfectRaid_Frames.lua b/PerfectRaid_Frames.lua
index adb49f1..672eebb 100644
--- a/PerfectRaid_Frames.lua
+++ b/PerfectRaid_Frames.lua
@@ -262,7 +262,16 @@ function Frames:CreateEditFrame(parent)
 	makeCheck(L["Group 6"], "6")
 	makeCheck(L["Group 7"], "7")
 	makeCheck(L["Group 8"], "8")
+	makeCheck(L["All Classes"], "IGNORE_ALLCLASS")

+	PRFrameFilter_IGNORE_ALLCLASS:SetScript("OnClick", function(self)
+			local checked = self:GetChecked()
+
+			for idx,button in ipairs(self.filters) do
+				button:SetChecked(checked)
+			end
+	end)
+
 	for idx,button in ipairs(self.filters) do
 		if idx == 1 then
 			button:SetPoint("TOPLEFT", title, "BOTTOMLEFT", 0, -15)
@@ -567,9 +576,7 @@ function Frames:SaveEntry()

 	local filterTbl = {}
 	for k,v in pairs(self.filters) do
-		if v.value == "Party" then
-			partyFrame = v:GetChecked()
-		elseif v:GetChecked() then
+		if v:GetChecked() and not v.value.match("^IGNORE")then
 			table.insert(filterTbl, v.value)
 		end
 	end
@@ -779,4 +786,4 @@ function Frames:CreateSwatch(name, parent)
 	swatch:SetScript("OnLeave", colorSwatchOnLeave)
 	swatch:SetScript("OnClick", colorSwatchOnClick)
 	return swatch
-end
\ No newline at end of file
+end