diff --git a/Buttons.lua b/Buttons.lua index 1902883..47ee0f3 100644 --- a/Buttons.lua +++ b/Buttons.lua @@ -362,7 +362,7 @@ do end end - local OnEnter = function() + function mod:ShowAllButtons() if not mod.db.controlVisibility or fadeStop or moving then return end for i = 1, #animFrames do @@ -380,7 +380,8 @@ do end end end - local OnLeave = function() + + function mod:HideAllButtons() if not mod.db.controlVisibility or moving then return end local focus = GetMouseFocus() -- Minimap or Minimap icons including nil checks to compensate for other addons if focus and not focus:IsForbidden() and ((focus:GetName() == "Minimap") or (focus:GetParent() and focus:GetParent():GetName() and focus:GetParent():GetName():find("Mini[Mm]ap"))) then @@ -403,6 +404,14 @@ do end end + local OnEnter = function() + mod:ShowAllButtons() + end + + local OnLeave = function() + mod:HideAllButtons() + end + local hideFrame = CreateFrame("Frame") -- Dummy frame we use for hiding buttons to prevent other addons re-showing them hideFrame:Hide() -- XXX hopefuly temporary workaround for line 376 of Minimap.lua @@ -597,6 +606,8 @@ do function mod:UpdateDraggables(frame) if not mod.db.allowDragging then return end + mod:ShowAllButtons() + if frame then local x, y = frame:GetCenter() local name = namesCompatForDF[frame] or frame:GetName() @@ -618,6 +629,9 @@ do end end end + + mod:HideAllButtons() + end end