Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » User Interface and AddOns

Reply
 
LinkBack Thread Tools
Old 05/17/09, 10:50 AM   #1
sanny
Glass Joe
 
sanny's Avatar
 
Gnome Mage
 
Aggramar (EU)
Combining 2 addons.

Making it simple, I wanna combine this code from nBuff:

local count = _G[buttonName..index.."Count"]
if (count) then
count:ClearAllPoints()
count:SetPoint("TOPRIGHT", button)
count:SetFont((count:GetFont()), 17, "OUTLINE")
count:SetDrawLayer("OVERLAY")

I wanna use it with rBuff, but everytime I try to change it, it just messes everything up. What the code does, is placing the buff amount in the top right corner.

And for the rBuff .lua:
Filebeam - Free Fast File Hosting

Thanks in advance

Offline
Reply With Quote
Old 05/17/09, 12:26 PM   #2
Rieux
Von Kaiser
 
Night Elf Druid
 
Vashj
The two addons are using different variable names and you're trying to combine the two; that is why it is not working. At line 89 of the rBuff.lua you posted, try this:

function addon:checkgloss(name,icontype)
    local b = _G[name.."Border"]
    local i = _G[name.."Icon"]
    local f = _G[name]
    local c = _G[name.."Gloss"]
    local ff = _G[name.."Duration"]
    local count = _G[name.."Count"]
    
    count:ClearAllPoints()
    count:SetPoint("TOPRIGHT", f)
    count:SetFont((count:GetFont()), 14, "OUTLINE")
    count:SetDrawLayer("OVERLAY")
I've tested it and it works.

Offline
Reply With Quote
Old 05/17/09, 1:31 PM   #3
sanny
Glass Joe
 
sanny's Avatar
 
Gnome Mage
 
Aggramar (EU)
Thanks a lot! It's working now!

Offline
Reply With Quote