Quantcast

think this is better

Darthpred [06-13-15 - 17:04]
think this is better
Filename
ElvUI_SLE/modules/auras.lua
ElvUI_SLE/options/auras_c.lua
diff --git a/ElvUI_SLE/modules/auras.lua b/ElvUI_SLE/modules/auras.lua
index 43527b4..4fedf1e 100644
--- a/ElvUI_SLE/modules/auras.lua
+++ b/ElvUI_SLE/modules/auras.lua
@@ -88,10 +88,31 @@ AT.Spells = {
 	},
 }

+local ignoreIcons = {}
 function AT:Update_ConsolidatedBuffsSettings()
 	local frame = A.frame
+	twipe(ignoreIcons)
+	if E.db.auras.consolidatedBuffs.filter then
+		if E.role == 'Caster' then
+			ignoreIcons[3] = 2
+		else
+			ignoreIcons[5] = 4
+		end
+	end
 	if(E.private.auras.disableBlizzard) then
 		for i = 1, NUM_LE_RAID_BUFF_TYPES do
+			local button = _G["ElvUIConsolidatedBuff"..i]
+			button:ClearAllPoints()
+			if i == 1 then
+				button:Point("TOPRIGHT", ElvUI_ConsolidatedBuffs, "TOPRIGHT", 0, -(E.PixelMode and 0 or 2))
+			else
+				button:Point("TOPRIGHT", frame[ignoreIcons[i - 1] or (i - 1)], "BOTTOMRIGHT", 0, (E.PixelMode and 2 or -1))
+			end
+
+			if button.icon:IsShown() then
+				button:SetWidth(E.ConsolidatedBuffsWidth - 3)
+			end
+
 			local buffIcon = _G[("ConsolidatedBuffsTooltipBuff%d"):format(i)]
 			buffIcon:Hide()
 		end
@@ -144,9 +165,9 @@ function A:CreateButton(i)

 	button.icon = CreateFrame("Frame", "ElvUIConsolidatedBuff"..i.."CanCast", button)
 	local icon = button.icon
-	icon:SetWidth(2)
-	icon:SetPoint("TOPRIGHT", button, -1, -1)
-	icon:SetPoint("BOTTOMRIGHT", button, -1, 1)
+	icon:SetWidth(3)
+	icon:SetPoint("TOPLEFT", button, -2, -1)
+	icon:SetPoint("BOTTOMLEFT", button, -2, 1)
 	local overlay = icon:CreateTexture(nil, "OVERLAY")
 	overlay:SetTexture(E['media'].blankTex)
 	overlay:SetAllPoints(icon)
@@ -154,6 +175,7 @@ function A:CreateButton(i)
 	overlay:SetVertexColor(classColor.r, classColor.g, classColor.b)
 	icon:SetFrameLevel(button:GetFrameLevel() + 3)
 	icon:Hide()
+	button.cd:SetFrameLevel(icon:GetFrameLevel() + 1)

 	return button
 end
diff --git a/ElvUI_SLE/options/auras_c.lua b/ElvUI_SLE/options/auras_c.lua
index 641c0d4..e560fa5 100644
--- a/ElvUI_SLE/options/auras_c.lua
+++ b/ElvUI_SLE/options/auras_c.lua
@@ -1,5 +1,7 @@
 local E, L, V, P, G = unpack(ElvUI);
 local AT = E:GetModule('SLE_AuraTimers')
+local A = E:GetModule('Auras')
+

 local function configTable()
 	E.Options.args.sle.args.options.args.general.args.auras = {
@@ -64,7 +66,7 @@ local function configTable()
 				desc = L["Create a mark bar on a consolidated buffs bar's icons for buffs your class can provide."],
 				disabled = function() return (E.private.general.minimap.enable ~= true or E.private.auras.disableBlizzard ~= true) end,
 				get = function(info) return E.db.sle.auras.consolidatedMark end,
-				set = function(info, value) E.db.sle.auras.consolidatedMark = value; AT:BuildCasts() end,
+				set = function(info, value) E.db.sle.auras.consolidatedMark = value; AT:BuildCasts(); A:Update_ConsolidatedBuffsSettings() end,
 			},
 		},
 	}