Quantcast

* Added some remaining bits for the config tab, just have to make it work

James Whitehead II [01-25-08 - 11:29]
* Added some remaining bits for the config tab, just have to make it work
* Added the code to hide the party background along with the party frames
Filename
Localization.enUS.lua
PerfectRaid.lua
PerfectRaid.toc
PerfectRaid_Config.lua
PerfectRaid_Options.lua
diff --git a/Localization.enUS.lua b/Localization.enUS.lua
index 53aa1dd..1a7731e 100644
--- a/Localization.enUS.lua
+++ b/Localization.enUS.lua
@@ -33,6 +33,7 @@ PerfectRaidLocals = {
 	["Druid"] = "Druid",
 	["Edit"] = "Edit",
 	["Enable"] = "Enable",
+	["Enable click-casting on frames"] = "Enable click-casting on frames",
 	["Fear Ward"] = "Fear Ward",
 	["Frame Scale:"] = "Frame Scale:",
 	["Frames have been locked"] = "Frames have been locked",
@@ -57,6 +58,7 @@ PerfectRaidLocals = {
 	["Group frames by:"] = "Group frames by:",
 	["Healing Touch"] = "Healing Touch",
 	["Healing Wave"] = "Healing Wave",
+	["Hide Blizzard Party Frames"] = "Hide Blizzard Party Frames",
 	["Highlight on mouseover"] = "Highlight on mouseover",
 	["Highlight when cursed"] = "Highlight when cursed",
 	["Highlight when diseased"] = "Highlight when diseased",
@@ -68,6 +70,7 @@ PerfectRaidLocals = {
 	["Innervate"] = "Innervate",
 	["Lesser Heal"] = "Lesser Heal",
 	["Lifebloom"] = "Lifebloom",
+	["Lock frames"] = "Lock frames",
 	["Mage"] = "Mage",
 	["Make filters strict"] = "Make filters strict",
 	["Mana Bar Height:"] = "Mana Bar Height:",
@@ -78,6 +81,7 @@ PerfectRaidLocals = {
 	["Number of Columns:"] = "Number of Columns:",
 	["Offline"] = "Offline",
 	["Only show if this buff is missing"] = "Only show if this buff is missing",
+	["Only show mana bar for mana users"] = "Only show mana bar for mana users",
 	["Out-of-Range Alpha"] = "Out-of-Range Alpha",
 	["Paladin"] = "Paladin",
 	["PerfectRaid Options"] = "PerfectRaid Options",
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index 74c835f..bb5e182 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -245,6 +245,9 @@ function PerfectRaid:CreateRaidFrame(idx)
 				f:UnregisterEvent("RAID_ROSTER_UPDATE")
 				f:UnregisterEvent("PARTY_MEMBERS_CHANGED")
 			end
+			if PartyMemberBackground and SHOW_PARTY_BACKGROUND == "1" then
+				PartyMemberBackground:Hide()
+			end
 			HidePartyFrame()
 		elseif self.hidingparty then
 			self.hidingparty = false
@@ -253,6 +256,9 @@ function PerfectRaid:CreateRaidFrame(idx)
 				f:RegisterEvent("RAID_ROSTER_UPDATE")
 				f:RegisterEvent("PARTY_MEMBERS_CHANGED")
 			end
+			if PartyMemberBackground and SHOW_PARTY_BACKGROUND == "1" then
+				PartyMemberBackground:Show()
+			end
 			ShowPartyFrame()
 		end
 	end
diff --git a/PerfectRaid.toc b/PerfectRaid.toc
index b231359..8b341ad 100644
--- a/PerfectRaid.toc
+++ b/PerfectRaid.toc
@@ -24,3 +24,4 @@ PerfectRaid_Buffs.lua
 PerfectRaid_Frames.lua
 PerfectRaid_Range.lua
 PerfectRaid_Highlight.lua
+PerfectRaid_Config.lua
diff --git a/PerfectRaid_Config.lua b/PerfectRaid_Config.lua
index d6bf6ab..8b83d25 100644
--- a/PerfectRaid_Config.lua
+++ b/PerfectRaid_Config.lua
@@ -45,7 +45,7 @@ local options
 function Config:CreateOptions(opt)
 	options = CreateFrame("Frame", "PROptions_Config", PROptions)

-	opt:AddOptionsTab("Config", options)
+	local tab = opt:AddOptionsTab("Config", options)

 	options.widgets = {}

@@ -91,32 +91,11 @@ function Config:CreateOptions(opt)
 		PerfectRaid.db.profile.highlight.curse = curse
 		PerfectRaid.db.profile.highlight.magic = magic
 		PerfectRaid.db.profile.highlight.poison = poison
-
-		-- Trigger update here
-		for unit in pairs(frames) do
-			Highlight:UpdateUnit(unit)
-		end
 	end

 	function options:CancelOptions()
-		local opt = PerfectRaid.db.profile.highlight
-
-		PRHighlight_Mouseover:SetChecked(opt.mouseover)
-		PRHighlight_Tooltip:SetChecked(opt.tooltip)
-		PRHighlight_Disease:SetChecked(opt.disease)
-		PRHighlight_Curse:SetChecked(opt.curse)
-		PRHighlight_Magic:SetChecked(opt.magic)
-		PRHighlight_Poison:SetChecked(opt.poison)
-
-		-- Trigger update here
-		for unit in pairs(frames) do
-			Highlight:UpdateUnit(unit)
-		end
 	end

-	-- Force an update when tab is clicked
-	options:SetScript("OnShow", options.CancelOptions)
-
 	for idx,widget in ipairs(options.widgets) do
 		widget:Show()
 		if idx == 1 then
diff --git a/PerfectRaid_Options.lua b/PerfectRaid_Options.lua
index a9417fd..d4d1504 100644
--- a/PerfectRaid_Options.lua
+++ b/PerfectRaid_Options.lua
@@ -91,7 +91,7 @@ function Options:CreateOptions()
 	end
 	PanelTemplates_SetNumTabs(PROptions, #tabs)
 	PanelTemplates_SetTab(PROptions, 0)
-	--self:TabOnClick(PROptionsTab1)
+	self:TabOnClick(PROptionsTab3)
 end

 local work = {}
@@ -118,11 +118,12 @@ function Options:AddOptionsTab(title, frame)
 	tab.frame:Hide()

 	table.insert(tabs, tab)
+	return tab
 end

 function Options:FadeIn(frame)
 	frame:Show()
-	UIFrameFadeIn(frame, 0.4)
+	UIFrameFadeIn(frame, 0.2)
 end

 function Options:FadeOut(frame)