1. #1

    Reverse achievement grow order

    So I am trying to make a small addon to get my achievement alerts on top. Problem now, they are growing out of my screen (to the top). But I have to admit, I dunno how to change that they grow to the bottom.

    Current code is like this: http://pastebin.com/XtGA4quY

    Can anyone help me?
    Last edited by Lyn; 2012-09-13 at 08:40 AM.
    oh, honey.

  2. #2
    Deleted
    Code:
    local _G, MAX_ACHIEVEMENT_ALERTS = _G, MAX_ACHIEVEMENT_ALERTS
    local numMoved = 0
    local lastMoved
    local movedAll
    hooksecurefunc("AchievementAlertFrame_GetAlertFrame",function()
        if movedAll then return end
        for n=(numMoved+1),MAX_ACHIEVEMENT_ALERTS do
            local f = _G[("AchievementAlertFrame%d"):format(n)]
            if f then
                if lastMoved then
                    f:SetPoint("TOP",lastMoved,"BOTTOM",0,10)
                else
                    f:SetPoint("TOP",UIParent,"TOP",0,-128)
                end
                lastMoved = f
                numMoved = n
            else
                break
            end
        end
        if numMoved == MAX_ACHIEVEMENT_ALERTS then movedAll=true end
    end)
    
    SlashCmdList.TEST_ACHIEVEMENT = function()
        AlertFrame_OnEvent(AlertFrame,"ACHIEVEMENT_EARNED",6)
    end
    SLASH_TEST_ACHIEVEMENT1 = "/tav"
    Untested. That's only for achievements - the code for the others should be similar, though. Look at the respective functions used to create the frames in the FrameXML.

Posting Permissions

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