Good morning, I have a lua code that hides some action bars (including the main action bar):
local function configActionBars()
-- Avoid interaction with action bars
local bars = {
"ActionButton",
"MultiBarBottomLeftButton",
"MultiBarBottomRightButton",
"MultiBarLeftButton",
"MultiBar5Button"
}
for _, bar in pairs(bars) do
for i = 1, 12 do
local button = _G[bar..i]
if button then
button:SetScript("OnEnter", nil)
button:SetScript("OnClick", nil)
end
end
end
-- Hide the main action bar and specified additional action bars at all times
MainMenuBar:SetAlpha(0)
MultiBarBottomLeft:SetAlpha(0)
MultiBarBottomRight:SetAlpha(0)
local function HideSelectedActionBars()
if MainMenuBar:IsShown() then
MainMenuBar:SetAlpha(0)
end
if MultiBarBottomLeft:IsShown() then
MultiBarBottomLeft:SetAlpha(0)
end
if MultiBarBottomRight:IsShown() then
MultiBarBottomRight:SetAlpha(0)
end
end
local f = CreateFrame("Frame")
f:SetScript("OnUpdate", HideSelectedActionBars)
end
The problem is that, as you can see from the attached video, the GCD keeps showing at every GCD. How can I modify the above lua code and fix this? Thanks in advance!