Skip to content

Commit

Permalink
minimapbutton fix
Browse files Browse the repository at this point in the history
Thanks Draugor
  • Loading branch information
nickbock committed Oct 4, 2023
1 parent d8d7dc3 commit c8caf87
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ElvUI_Enhanced.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions modules/maps/minimapbuttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c8caf87

Please sign in to comment.