From c8caf87b6e9d7f2f9d67b1e3ab85046f8644ba44 Mon Sep 17 00:00:00 2001 From: Tevoll Date: Wed, 4 Oct 2023 20:00:05 +0200 Subject: [PATCH] minimapbutton fix Thanks Draugor --- ElvUI_Enhanced.toc | 4 ++-- modules/maps/minimapbuttons.lua | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ElvUI_Enhanced.toc b/ElvUI_Enhanced.toc index 9797ac7..c87f26f 100755 --- a/ElvUI_Enhanced.toc +++ b/ElvUI_Enhanced.toc @@ -1,7 +1,7 @@ -## Interface: 100100 +## Interface: 100107 ## Title: |cff1784d1ElvUI|r Enhanced Again ## Author: Tevoll -## Version: 4.2.2 +## Version: 4.2.3 ## Notes: Plugin-Enhancements for |cff1784d1ElvUI|r. ## X-Category: Plugins ## URL: https://www.curseforge.com/wow/addons/elvui-enhanced-again diff --git a/modules/maps/minimapbuttons.lua b/modules/maps/minimapbuttons.lua index efe63bd..5870b96 100755 --- a/modules/maps/minimapbuttons.lua +++ b/modules/maps/minimapbuttons.lua @@ -4,6 +4,7 @@ local MB = E:NewModule('MinimapButtons', 'AceHook-3.0', 'AceEvent-3.0', 'AceTime local LO = E:GetModule('Layout') local Skins = E:GetModule('Skins') local _G = _G +local LibDBIcon = LibStub('LibDBIcon-1.0') -- Based on Square Minimap Buttons -- Original authors: Azilroka, Sinaris @@ -94,6 +95,15 @@ function MB:SkinButton(frame) for i = 1, #whiteList do if sub(name, 1, len(whiteList[i])) == whiteList[i] then validIcon = true break end end + + -- check if the button is a LibDBIcon and if it was hidden: + local libIconName = string.gsub(name,"LibDBIcon10_","") + if (not (libIconName == name)) and LibDBIcon then + local libBtn = LibDBIcon:GetMinimapButton(libIconName) + if libBtn.db and libBtn.db.hide then + return + end + end if not validIcon then for i = 1, #ignoreButtons do