/trunk
f.bar:SetWidth(pos.bar.width) |
f.bar:SetHeight(pos.bar.height) |
f.bar.tex:SetVertexColor(0,0,0) |
f.bar.tex:SetVertexColor(pos.bar,r, pos.bar.g, pos.bar.b, pos.bar.a) |
f.bar.tex:SetVertexColor(pos.bar,r, pos.bar.g, pos.bar.b, 1-pos.bar.a) |
BSetPoint(f.bar, pos.bar.x-pos.x, pos.bar.y-pos.y, f, "CENTER") |
BSetPoint(f.durationb, pos.durationb.x-pos.x, pos.durationb.y-pos.y, f, "CENTER") |
end |
end |
end |
--[[ |
As you can see, the problem with sorting the buffs by duration is that it requires UnitAura to be called twice as often: |
once, to determine the duration of all of the buffs and sort them, and then again to set the buff frames and positions up. |
--]] |
function BuffedUpdate(self, event, unit, ...) |
if (event == "UNIT_AURA") and (unit == "player") or (self == "force") then |
HiddenCount = 0 -- reset each time |
f.bar:SetHeight(pos.bar.height) |
f.bar.tex:SetVertexColor(0,0,0) |
f.bar.tex:SetVertexColor(pos.bar,r, pos.bar.g, pos.bar.b, pos.bar.a) |
BSetPoint(f.bar, pos.bar.x, pos.bar.y) |
BSetPoint(f.bar, pos.bar.x-pos.x, pos.bar.y-pos.y, f, "CENTER") |
BSetPoint(f.durationb, pos.durationb.x, pos.durationb.y) |
end |
end) |
f.bar:SetHeight(pos.bar.height) |
f.bar.tex:SetVertexColor(0,0,0) |
f.bar.tex:SetVertexColor(pos.bar,r, pos.bar.g, pos.bar.b, pos.bar.a) |
BSetPoint(f.bar, pos.bar.x, pos.bar.y) |
BSetPoint(f.bar, pos.bar.x-pos.x, pos.bar.y-pos.y, f, "CENTER") |
BSetPoint(f.durationb, pos.durationb.x, pos.durationb.y) |
end |
end) |