From 8dc6776b9beed657f232f05b3e3b42050a0e748c Mon Sep 17 00:00:00 2001 From: Darth Predator Date: Sat, 21 Jan 2017 13:59:40 +0300 Subject: [PATCH] God dammit, Altoholic! --- ElvUI_SLE/modules/minimap/minimapicons.lua | 33 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ElvUI_SLE/modules/minimap/minimapicons.lua b/ElvUI_SLE/modules/minimap/minimapicons.lua index dd6830e..8def8d6 100644 --- a/ElvUI_SLE/modules/minimap/minimapicons.lua +++ b/ElvUI_SLE/modules/minimap/minimapicons.lua @@ -93,22 +93,23 @@ local function SkinButton(Button) if Button:IsObjectType('Button') then local ValidIcon = false - - for i = 1, #SMB.WhiteList do - if strsub(Name, 1, T.strlen(SMB.WhiteList[i])) == SMB.WhiteList[i] then ValidIcon = true break end - end - - if not ValidIcon then - for i = 1, #SMB.ignoreButtons do - if Name == SMB.ignoreButtons[i] then return end + if Name then + for i = 1, #SMB.WhiteList do + if strsub(Name, 1, T.strlen(SMB.WhiteList[i])) == SMB.WhiteList[i] then ValidIcon = true break end end - for i = 1, #SMB.GenericIgnores do - if strsub(Name, 1, T.strlen(SMB.GenericIgnores[i])) == SMB.GenericIgnores[i] then return end - end + if not ValidIcon then + for i = 1, #SMB.ignoreButtons do + if Name == SMB.ignoreButtons[i] then return end + end - for i = 1, #SMB.PartialIgnores do - if T.find(Name, SMB.PartialIgnores[i]) ~= nil then return end + for i = 1, #SMB.GenericIgnores do + if strsub(Name, 1, T.strlen(SMB.GenericIgnores[i])) == SMB.GenericIgnores[i] then return end + end + + for i = 1, #SMB.PartialIgnores do + if T.find(Name, SMB.PartialIgnores[i]) ~= nil then return end + end end end @@ -158,9 +159,7 @@ local function SkinButton(Button) _G["VendomaticButton"]:SetInside() _G["VendomaticButtonIcon"]:SetTexture('Interface\\Icons\\INV_Misc_Rabbit_2') _G["VendomaticButtonIcon"]:SetTexCoord(T.unpack(TexCoords)) - end - - if Name == 'QueueStatusMinimapButton' then + elseif Name == 'QueueStatusMinimapButton' then _G["QueueStatusMinimapButton"]:HookScript('OnUpdate', function(self) _G["QueueStatusMinimapButtonIcon"]:SetFrameLevel(_G["QueueStatusMinimapButton"]:GetFrameLevel() + 1) end) @@ -244,7 +243,7 @@ function SMB:SkinMinimapButtons() for i = 1, _G["Minimap"]:GetNumChildren() do local object = T.select(i, _G["Minimap"]:GetChildren()) if object then - if object:IsObjectType('Button') and object:GetName() then + if object:IsObjectType('Button') then --and object:GetName() then SkinButton(object) end for _, frame in T.pairs(SMB.AcceptedFrames) do -- 1.7.9.5