#Hide GCD blink on action bars

8 messages · Page 1 of 1 (latest)

junior whale
#

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!

#

Hide GCD blink on action bars

weak trail
#

I myself simply set my bars alpha to 0 and don't have this. You can inspect those frames with /fstack or VDT and see if you need to hide something else there

#

Besides that: f:SetScript("OnUpdate", HideSelectedActionBars)

#

you're running your script there every frame

#

which is completely unnecessary obviously, and bad for performance. how come you do it like that?

#

well, in the first place it's completely unneeded to create a frame in WA. you can simply execute your stuff in the on-init of some random aura

junior whale
#

Thanks for the reply. I've tried putting only this code:

MainMenuBar:SetAlpha(0)
MultiBarBottomLeft:SetAlpha(0)
MultiBarBottomRight:SetAlpha(0)

but still get the same behaviour. At every GCD there's this blink