1. #1

    [help] modifying action bar addon

    Hey guys I need some help adding some lua code to an addon I use that auto shows/hides the right action bar on mouseover.
    The addon itself works perfectly except when I click on mage teleport or Portal and mouse off the action bar to click on a city - the action bar disappears (as intended).

    Is it possible to add SpellFlyout buttons 1-13 to the following code?

    Code:
    MultiBarRight:EnableMouse(true)
    MultiBarRight:SetAlpha(0)
    MultiBarRight:SetScript("OnEnter", function(self) self:SetAlpha(1) end)
    MultiBarRight:SetScript("OnLeave", function(self) self:SetAlpha(0) end)
    local function hidebar2() MultiBarRight:SetAlpha(0) end
    local function showbar2() MultiBarRight:SetAlpha(1) end
    for btn=1,12 do
        _G["MultiBarRightButton"..btn]:SetScript("OnEnter",showbar2)
        _G["MultiBarRightButton"..btn]:SetScript("OnLeave",hidebar2)
    end
    - - - Updated - - -

    *Edit*
    If that's not possible - how about adding a 5 second timer to the "OnLeave" event?
    Last edited by Petrol; 2020-09-16 at 12:37 AM.

  2. #2
    Yes, adding cancellable timer would be the easiest solution.
    https://wow.gamepedia.com/API_C_Timer.NewTicker

  3. #3
    Thanks for the link!

    I must be doing something really wrong as I keep getting errors.
    If anyone knows the proper way to do it I'd really appreciate the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •