Quantcast

Moved questguru variables to private + option

Darthpred [08-17-16 - 07:46]
Moved questguru variables to private + option
Filename
ElvUI_SLE/defaults/private.lua
ElvUI_SLE/defaults/profile.lua
ElvUI_SLE/options/skins_c.lua
ElvUI_SLE/skins/addons/questguru.lua
diff --git a/ElvUI_SLE/defaults/private.lua b/ElvUI_SLE/defaults/private.lua
index 2f14824..8114760 100644
--- a/ElvUI_SLE/defaults/private.lua
+++ b/ElvUI_SLE/defaults/private.lua
@@ -177,6 +177,9 @@ V["sle"] = {
 			["style"] = "Default",
 			["subpages"] = 2,
 		},
+		["questguru"] = {
+			["removeParchment"] = false,
+		},
 	},
 	["uibuttons"] = {
 		["style"] = "classic",
diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua
index b61e604..15b8511 100644
--- a/ElvUI_SLE/defaults/profile.lua
+++ b/ElvUI_SLE/defaults/profile.lua
@@ -634,9 +634,6 @@ P["sle"] = {
 				["subOutline"] = "OUTLINE",
 			},
 		},
-		["questguru"] = {
-			["removeParchment"] = false,
-		},
 	},
 	--Tooltip
 	["tooltip"] = {
diff --git a/ElvUI_SLE/options/skins_c.lua b/ElvUI_SLE/options/skins_c.lua
index 6ceb205..1cfd6ff 100644
--- a/ElvUI_SLE/options/skins_c.lua
+++ b/ElvUI_SLE/options/skins_c.lua
@@ -84,7 +84,7 @@ local function configTable()
 						type = "toggle",
 						name = L["Underline"],
 						desc = L["Creates a cosmetic line under objective headers."],
-						disabled = function() return not E.private.sle.skins.objectiveTracker.enable or SLE._Compatibility["QuestKing"] end,
+						disabled = function() return not E.private.sle.skins.objectiveTracker.enable end,
 						get = function(info) return E.db.sle.skins.objectiveTracker[ info[#info] ] end,
 						set = function(info, value) E.db.sle.skins.objectiveTracker[ info[#info] ] = value; Sk:Update_ObjectiveTrackerUnderlinesVisibility() end,
 					},
@@ -92,7 +92,7 @@ local function configTable()
 						type = 'color',
 						order = 8,
 						name = L["Underline Color"],
-						disabled = function() return not E.private.sle.skins.objectiveTracker.enable or not E.db.sle.skins.objectiveTracker.underline or E.db.sle.skins.objectiveTracker.underlineClass or SLE._Compatibility["QuestKing"] end,
+						disabled = function() return not E.private.sle.skins.objectiveTracker.enable or not E.db.sle.skins.objectiveTracker.underline or E.db.sle.skins.objectiveTracker.underlineClass  end,
 						get = function(info)
 							local t = E.db.sle.skins.objectiveTracker[ info[#info] ]
 							local d = P.sle.skins.objectiveTracker[info[#info]]
@@ -109,7 +109,7 @@ local function configTable()
 						order = 9,
 						type = "toggle",
 						name = L["Class Colored Underline"],
-						disabled = function() return not E.private.sle.skins.objectiveTracker.enable or not E.db.sle.skins.objectiveTracker.underline or SLE._Compatibility["QuestKing"] end,
+						disabled = function() return not E.private.sle.skins.objectiveTracker.enable or not E.db.sle.skins.objectiveTracker.underline end,
 						get = function(info) return E.db.sle.skins.objectiveTracker[ info[#info] ] end,
 						set = function(info, value) E.db.sle.skins.objectiveTracker[ info[#info] ] = value; Sk:Update_ObjectiveTrackerUnderlinesColor() end,
 					},
@@ -118,7 +118,7 @@ local function configTable()
 						type = 'range',
 						name = L["Underline Height"],
 						min = 1, max = 10, step = 1,
-						disabled = function() return not E.private.sle.skins.objectiveTracker.enable or not E.private.skins.blizzard.enable or not E.private.skins.blizzard.objectiveTracker or SLE._Compatibility["QuestKing"] end,
+						disabled = function() return not E.private.sle.skins.objectiveTracker.enable or not E.private.skins.blizzard.enable or not E.private.skins.blizzard.objectiveTracker end,
 					},
 					space4 = {
 						order = 11,
@@ -260,6 +260,23 @@ local function configTable()
 			},
 		},
 	}
+
+	if T.IsAddOnLoaded("QuestGuru") then
+		E.Options.args.sle.args.skins.args.QuestGuru = {
+			order = 12,
+			type = "group",
+			name = "QuestGuru",
+			get = function(info) return E.private.sle.skins.questguru[ info[#info] ] end,
+			set = function(info, value) E.private.sle.skins.questguru[ info[#info] ] = value; E:StaticPopup_Show("PRIVATE_RL") end,
+			args = {
+				removeParchment = {
+					order = 1,
+					type = "toggle",
+					name = L["Remove Parchment"],
+				},
+			},
+		}
+	end
 end

 T.tinsert(SLE.Configs, configTable)
\ No newline at end of file
diff --git a/ElvUI_SLE/skins/addons/questguru.lua b/ElvUI_SLE/skins/addons/questguru.lua
index 64e22bf..760d3d0 100644
--- a/ElvUI_SLE/skins/addons/questguru.lua
+++ b/ElvUI_SLE/skins/addons/questguru.lua
@@ -18,7 +18,7 @@ local function LoadSkin()

 	S:HandleScrollBar(_G["QuestGuruScrollFrameScrollBar"])
 	S:HandleScrollBar(_G["QuestGuruDetailScrollFrameScrollBar"])
-	if (E.db.sle.skins.questguru.removeParchment) then
+	if (E.private.sle.skins.questguru.removeParchment) then
 		_G["QuestGuruDetailScrollFrame"]:StripTextures();
 	else
 		_G["QuestGuruDetailScrollFrame"].DetailBG:SetTexture("Interface\\QuestFrame\\QuestBG")