mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-10 15:40:01 +00:00
addonbuttons: add option to hide on combat start
This commit is contained in:
@@ -49,6 +49,18 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function ()
|
||||
end
|
||||
end)
|
||||
|
||||
-- hide flyout frame when entering combat
|
||||
local pfUIAddonButtonHide = CreateFrame("Frame", nil, UIParent)
|
||||
pfUIAddonButtonHide:RegisterEvent('PLAYER_REGEN_DISABLED')
|
||||
pfUIAddonButtonHide:SetScript("OnEvent", function()
|
||||
local enabled = C.appearance.minimap.addon_buttons == "1"
|
||||
if enabled then
|
||||
if pfUI.addonbuttons:IsShown() then
|
||||
pfUI.addonbuttons:Hide()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.addonbuttons.buttons = {}
|
||||
pfUI.addonbuttons.overrides = {}
|
||||
pfUI.addonbuttons.last_updated = 0
|
||||
|
||||
Reference in New Issue
Block a user