CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on Need help/ input: Weird thing happens when i stack multiple action buttons - at one point the keybinds and buttons get mixed up.

    In reply to Ketho17:

     Thanks for the tip, I have an idea of the issue rooted in stacking bars in Z that is in front of each other, will make them go to "page mode"

    This gave me som differnet issues, as i could easily change page out of combat, the method ChangeActionBar(int); is restricted to NON-COMBAT calls.

    However, through some digging at different sites the last couple of days, i came across a thread with someone trying to do the same thing. Unclear if he succeeded, but in this thread there was a reference to an old outdated AddOn from patch 5.2, called Paging, It turns out this addon once i updated it with the Current API variables and methods, works exactly like i want, even with my existing bits. There Answer is to look into the SecureHandlerTemplates,  create a frame, and inherit from that template, then use a frame:SetAttribute("state-paging", SecureCmdOptionParse("[mod:alt]2")); if you whish to get to page 2 on presssing alt, and if its a while pressed you need to set the attribute again with "[mod:]1" this will return the page to page 1 if it isnt pressed. Its unclear to me at this point, but i suspect RegisterAttributeDriver(PagingFrame, "state-paging", "[mod:alt]2"); or what ever condition and action is the intended one must follow SetAttribute eachtime it has to be set.


    I will update here once with full code and explanation once I figure it out, as i understand the struggle and frustration it can be to find someone who found the answer but didn't share it :). 

    Posted in: AddOn HELP!
  • 0

    posted a message on Need help/ input: Weird thing happens when i stack multiple action buttons - at one point the keybinds and buttons get mixed up.

    Hi, for the first time in ages im back to playing wow, but this time i am also building myself my own 100% custom interface... or so i thought i was, I have got an XP bar done that i am satisfied with, and I had some issues with the way i created action buttons and not having them show any cooldowns etc. So i decided to just move around with Blizzards buttons, however... things are not going as planned. I can easily get the buttons to where i want them to with ClearAllPoints() then move them to the spot i like with a new SetPoint(), but then things start to get complicated, I want only 5 Action Buttons visible at one time! It is essential for my clean look! So i use modifiers Shift, Control and Alt, and i can get the following effect just fine:
    See Attatchments 1-3,

    HOWEVER.... now it becomes really strange when i do the same a 3rd time... this weirdoshizle happens:

    See attatchments 1 and  4
    The ActionButton1 through 5 has now hijacked the hotkeys alt Q through alt F! And the Buttons that were supposed to be different are nowhere to be seen.

    Now there is no reason for this to happen but it doesnt matter which extra action bar i take the buttons from, when I overlap with the original bar a third time it always goes badly.

    Im a bit lost to be honest what to do next with this thing, and was hoping some of you could help :)

    Note that loop based or single run based methods result in the same things.

    Also note this swapping wont work in combat, i presume i have to hook a method or two to override an actionbar lock.

    Code used to move:

    function NoLoopMover(a,b,c,d,e,barnum)
        if(barnum == 2)then
            if(a ~= nil)then
                _G["MultiBarBottomLeftButton"..a]:SetParent(framePage2,"CENTER")
                _G["MultiBarBottomLeftButton"..a]:ClearAllPoints()
                _G["MultiBarBottomLeftButton"..a]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()+4) - (_G['btn']:GetWidth()+4),0)
            end
            if(b ~= nil)then
                _G["MultiBarBottomLeftButton"..b]:SetParent(framePage2,"CENTER")
                _G["MultiBarBottomLeftButton"..b]:ClearAllPoints()
                _G["MultiBarBottomLeftButton"..b]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*2+4*2) - (_G['btn']:GetWidth()+4),0)
            end
            if(c ~= nil)then
                _G["MultiBarBottomLeftButton"..c]:SetParent(framePage2,"CENTER")
                _G["MultiBarBottomLeftButton"..c]:ClearAllPoints()
                _G["MultiBarBottomLeftButton"..c]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*3+4*3) - (_G['btn']:GetWidth()+4),0)
            end
            if(d ~= nil)then
                _G["MultiBarBottomLeftButton"..d]:SetParent(framePage2,"CENTER")
                _G["MultiBarBottomLeftButton"..d]:ClearAllPoints()
                _G["MultiBarBottomLeftButton"..d]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*4+4*4) - (_G['btn']:GetWidth()+4),0)
            end
            if(e ~= nil)then
                _G["MultiBarBottomLeftButton"..e]:SetParent(framePage2,"CENTER")
                _G["MultiBarBottomLeftButton"..e]:ClearAllPoints()
                _G["MultiBarBottomLeftButton"..e]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*5+4*5) - (_G['btn']:GetWidth()+4),0)
            end
        elseif(barnum == 1)then
            if(a ~= nil) then
                _G["ActionButton"..a]:SetParent(frame,"CENTER")
                _G["ActionButton"..a]:ClearAllPoints()
                _G["ActionButton"..a]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()+4) - (_G['btn']:GetWidth()+4),0)
            end
            if(b ~= nil)then
                _G["ActionButton"..b]:SetParent(frame,"CENTER")
                _G["ActionButton"..b]:ClearAllPoints()
                _G["ActionButton"..b]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*2+4*2) - (_G['btn']:GetWidth()+4),0)
            end
            if(c ~= nil)then
                _G["ActionButton"..c]:SetParent(frame,"CENTER")
                _G["ActionButton"..c]:ClearAllPoints()
                _G["ActionButton"..c]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*3+4*3) - (_G['btn']:GetWidth()+4),0)
            end
            if(d ~= nil)then
                _G["ActionButton"..d]:SetParent(frame,"CENTER")
                _G["ActionButton"..d]:ClearAllPoints()
                _G["ActionButton"..d]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*4+4*4) - (_G['btn']:GetWidth()+4),0)
            end
            if(e ~= nil)then
                _G["ActionButton"..e]:SetParent(frame,"CENTER")
                _G["ActionButton"..e]:ClearAllPoints()
                _G["ActionButton"..e]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*5+4*5) - (_G['btn']:GetWidth()+4),0)
            end
        elseif(barnum == 3)then
                
            if(a ~= nil)then
                _G["MultiBarBottomRightButton"..a]:SetParent(frame,"CENTER")
                _G["MultiBarBottomRightButton"..a]:ClearAllPoints()
                _G["MultiBarBottomRightButton"..a]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()+4) - (_G['btn']:GetWidth()+4),0)
            end
            if(b ~= nil)then
                _G["MultiBarBottomRightButton"..b]:SetParent(frame,"CENTER")
                _G["MultiBarBottomRightButton"..b]:ClearAllPoints()
                _G["MultiBarBottomRightButton"..b]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*2+4*2) - (_G['btn']:GetWidth()+4),0)
            end
            if(c ~= nil)then
                _G["MultiBarBottomRightButton"..c]:SetParent(frame,"CENTER")
                _G["MultiBarBottomRightButton"..c]:ClearAllPoints()
                _G["MultiBarBottomRightButton"..c]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*3+4*3) - (_G['btn']:GetWidth()+4),0)
            end
            if(d ~= nil)then
                _G["MultiBarBottomRightButton"..d]:SetParent(frame,"CENTER")
                _G["MultiBarBottomRightButton"..d]:ClearAllPoints()
                _G["MultiBarBottomRightButton"..d]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*4+4*4) - (_G['btn']:GetWidth()+4),0)
            end
            if(e ~= nil)then
                _G["MultiBarBottomRightButton"..e]:SetParent(frame,"CENTER")
                _G["MultiBarBottomRightButton"..e]:ClearAllPoints()
                _G["MultiBarBottomRightButton"..e]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*5+4*5) - (_G['btn']:GetWidth()+4),0)
            end
            elseif(barnum == 4)then
                if(a ~= nil)then
                    _G["MultiBarBottomLeftButton"..a]:SetParent(framePage2,"CENTER")
                    _G["MultiBarBottomLeftButton"..a]:ClearAllPoints()
                    _G["MultiBarBottomLeftButton"..a]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()+4) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(b ~= nil)then
                    _G["MultiBarBottomLeftButton"..b]:SetParent(framePage2,"CENTER")
                    _G["MultiBarBottomLeftButton"..b]:ClearAllPoints()
                    _G["MultiBarBottomLeftButton"..b]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*2+4*2) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(c ~= nil)then
                    _G["MultiBarBottomLeftButton"..c]:SetParent(framePage2,"CENTER")
                    _G["MultiBarBottomLeftButton"..c]:ClearAllPoints()
                    _G["MultiBarBottomLeftButton"..c]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*3+4*3) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(d ~= nil)then
                    _G["MultiBarBottomLeftButton"..d]:SetParent(framePage2,"CENTER")
                    _G["MultiBarBottomLeftButton"..d]:ClearAllPoints()
                    _G["MultiBarBottomLeftButton"..d]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*4+4*4) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(e ~= nil)then
                    _G["MultiBarBottomLeftButton"..e]:SetParent(framePage2,"CENTER")
                    _G["MultiBarBottomLeftButton"..e]:ClearAllPoints()
                    _G["MultiBarBottomLeftButton"..e]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*5+4*5) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
            elseif(barnum == 5)then
                if(a ~= nil)then
                    _G["MultiBarLeftButton"..a]:SetParent(framePage2,"CENTER")
                    _G["MultiBarLeftButton"..a]:ClearAllPoints()
                    _G["MultiBarLeftButton"..a]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()+4) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(b ~= nil)then
                    _G["MultiBarLeftButton"..b]:SetParent(framePage2,"CENTER")
                    _G["MultiBarLeftButton"..b]:ClearAllPoints()
                    _G["MultiBarLeftButton"..b]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*2+4*2) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(c ~= nil)then
                    _G["MultiBarLeftButton"..c]:SetParent(framePage2,"CENTER")
                    _G["MultiBarLeftButton"..c]:ClearAllPoints()
                    _G["MultiBarLeftButton"..c]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*3+4*3) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(d ~= nil)then
                    _G["MultiBarLeftButton"..d]:SetParent(framePage2,"CENTER")
                    _G["MultiBarLeftButton"..d]:ClearAllPoints()
                    _G["MultiBarLeftButton"..d]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*4+4*4) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end
                if(e ~= nil)then
                    _G["MultiBarLeftButton"..e]:SetParent(framePage2,"CENTER")
                    _G["MultiBarLeftButton"..e]:ClearAllPoints()
                    _G["MultiBarLeftButton"..e]:SetPoint("CENTER", "myButton", (_G['btn']:GetWidth()*5+4*5) - (_G['btn']:GetWidth()+4),(_G['btn']:GetHeight()+4))
                end  
                
        end    
    end

     

    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.