Quantcast

* Added a checkbox to raid frame filters for "Party". This box does nothing, but will be used to enable a "party" frame.

James Whitehead II [04-10-07 - 02:11]
* Added a checkbox to raid frame filters for "Party".  This box does nothing, but will be used to enable a "party" frame.
Filename
PerfectRaid_Frames.lua
diff --git a/PerfectRaid_Frames.lua b/PerfectRaid_Frames.lua
index 36fc287..ffd99a8 100644
--- a/PerfectRaid_Frames.lua
+++ b/PerfectRaid_Frames.lua
@@ -230,7 +230,8 @@ function Frames:CreateEditFrame(parent)
 	makeCheck(L["Group 6"], "6")
 	makeCheck(L["Group 7"], "7")
 	makeCheck(L["Group 8"], "8")
-
+	makeCheck(L["Party"], "Party")
+
 	for idx,button in ipairs(self.filters) do
 		if idx == 1 then
 			button:SetPoint("TOPLEFT", title, "BOTTOMLEFT", 0, -15)
@@ -401,8 +402,11 @@ function Frames:EditEntry()
 	local filterTbl = {strsplit(",", entry.filter or "")}
 	for k,v in pairs(filterTbl) do filterTbl[v] = true end

+	local partyFrame = entry.partyFrame
 	for k,v in pairs(self.filters) do
-		if filterTbl[v.value] then
+		if v.value == "Party" then
+			v:SetChecked(partyFrame)
+		elseif filterTbl[v.value] then
 			v:SetChecked(true)
 		end
 	end
@@ -454,13 +458,17 @@ function Frames:SaveEntry()
 	local title = PROptions_Frames_EditTitle:GetText()
 	local groupBy = UIDropDownMenu_GetSelectedValue(PRFrames_GroupByDropDown)
 	local sortType = UIDropDownMenu_GetSelectedValue(PRFrames_SortDropDown)
+	local partyFrame

 	local filterTbl = {}
 	for k,v in pairs(self.filters) do
-		if v:GetChecked() then
+		if v.value == "Party" then
+			partyFrame = v:GetChecked()
+		elseif v:GetChecked() then
 			table.insert(filterTbl, v.value)
 		end
 	end
+
 	local filter = strjoin(",", unpack(filterTbl))
 	local numColumns = tonumber(PROptions_Frames_EditNumCols:GetText())
 	local maxUnits = tonumber(PROptions_Frames_EditMaxUnits:GetText())
@@ -503,6 +511,7 @@ function Frames:SaveEntry()
 	entry.groupBy = groupBy
 	entry.sortType = sortType

+	entry.partyFrame = partyFrame
 	entry.filter = filter
 	entry.numColumns = numColumns
 	entry.maxUnits = maxUnits