Option to hide actionbars on combat
Closed this issue · 3 comments
Wolfeg commented
It would be nice if that function will be added
Wetxius commented
I don't really understand how this option should work.
Bars in combat are usually required. If they are not needed often, then you can enable them by mouseover.
Wolfeg commented
Wetxius commented
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function()
if ActionBarAnchor then RegisterStateDriver(ActionBarAnchor, "visibility", "[combat] hide; show") end
if RightActionBarAnchor then RegisterStateDriver(RightActionBarAnchor, "visibility", "[combat] hide; show") end
if StanceBarAnchor then RegisterStateDriver(StanceBarAnchor, "visibility", "[combat] hide; show") end
if PetActionBarAnchor then RegisterStateDriver(PetActionBarAnchor, "visibility", "[combat] hide; show") end
if SplitBarLeft then RegisterStateDriver(SplitBarLeft, "visibility", "[combat] hide; show") end
if SplitBarRight then RegisterStateDriver(SplitBarRight, "visibility", "[combat] hide; show") end
if Bar5Holder then RegisterStateDriver(Bar5Holder, "visibility", "[combat] hide; show") end
if Bar6Holder then RegisterStateDriver(Bar6Holder, "visibility", "[combat] hide; show") end
if Bar7Holder and C.actionbar.bar7_enable then RegisterStateDriver(Bar7Holder, "visibility", "[combat] hide; show") end
if Bar8Holder and C.actionbar.bar8_enable then RegisterStateDriver(Bar8Holder, "visibility", "[combat] hide; show") end
end)