From f3b9fc48b3a938c33fed6426c8a21a009c36c040 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sat, 12 Sep 2015 10:41:16 +0400 Subject: [PATCH] Try to support masque support lol --- ElvUI_SLE/modules/auras.lua | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ElvUI_SLE/modules/auras.lua b/ElvUI_SLE/modules/auras.lua index 14ca2dc..0027799 100644 --- a/ElvUI_SLE/modules/auras.lua +++ b/ElvUI_SLE/modules/auras.lua @@ -2,6 +2,8 @@ local E, L, V, P, G = unpack(ElvUI); local AT = E:GetModule('SLE_AuraTimers'); local A = E:GetModule('Auras'); local SLE = E:GetModule("SLE") +local Masque = LibStub("Masque", true) +local MasqueGroup = Masque and Masque:Group("ElvUI", "Consolidated Buffs") local format = string.format local twipe = table.wipe @@ -147,7 +149,7 @@ end function A:CreateButton(i) local button = CreateFrame("Button", "ElvUIConsolidatedBuff"..i, ElvUI_ConsolidatedBuffs, "SecureActionButtonTemplate") - button:SetTemplate('Default') + -- button:SetTemplate('Default') button.BuffID = i button.t = button:CreateTexture(nil, "OVERLAY") @@ -167,6 +169,31 @@ function A:CreateButton(i) button.timer = button.cd:CreateFontString(nil, 'OVERLAY') button.timer:SetPoint('CENTER') + local ButtonData = { + FloatingBG = nil, + Icon = button.t, + Cooldown = button.cd, + Flash = nil, + Pushed = nil, + Normal = nil, + Disabled = nil, + Checked = nil, + Border = nil, + AutoCastable = nil, + Highlight = nil, + HotKey = nil, + Count = nil, + Name = nil, + Duration = false, + AutoCast = nil, + } + + if MasqueGroup and E.private.auras.masque.consolidatedBuffs then + MasqueGroup:AddButton(button, ButtonData) + elseif not E.private.auras.masque.consolidatedBuffs then + button:SetTemplate('Default') + end + button:RegisterForClicks("LeftButtonUp", "RightButtonUp") button:SetScript("OnEnter", function(self) ConsOnEnter(self) end) button:SetScript("OnLeave", function(self) ConsOnLeave() end) -- 1.7.9.5