I'm so close to finishing my UI, but I really need some help with my buffs, which I am scripting through oUF.
I have a few (3) objectives here.
Firstly, how can I change the font on the "count" text? (circled in green)
Secondly, how can I sort them in order of time remaining?
Lastly, and most importantly, how can I add a text to display time remaining?
Code:
lib.PostCreateIcon = function(self, button)
button.cd:SetReverse(true)
button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
button.icon:SetDrawLayer("BACKGROUND")
--Count
button.count:ClearAllPoints()
button.count:SetJustifyH("RIGHT")
button.count:SetPoint("TOPRIGHT", button, "TOPRIGHT", 0, 0)
button.count:SetTextColor(1,1,1)
--Helper
local h = CreateFrame("Frame", nil, button)
h:SetFrameLevel(0)
h:SetPoint("TOPLEFT", -0, 0)
h:SetPoint("BOTTOMRIGHT", 0, -0)
lib.gen_backdrop(h)
end
lib.playBuffs = function(f)
b = CreateFrame("Frame", nil, f)
b.size = 30
if f.mystyle == "target" then
b.num = 40
elseif f.mystyle == "player" then
b.num = 10
b.onlyShowPlayer = true
else
b.num = 5
end
b.spacing = 5
b.onlyShowPlayer = false
b:SetHeight((b.size+b.spacing)*4)
b:SetWidth(f.width)
b:SetPoint("BOTTOMLEFT", f, "TOPLEFT", 0, 500)
b.initialAnchor = "TOPRIGHT"
b["growth-x"] = "LEFT"
b["growth-y"] = "DOWN"
b.PostCreateIcon = lib.PostCreateIcon
f.Buffs = b
BuffFrame:UnregisterEvent("UNIT_AURA")
BuffFrame:Hide()
TemporaryEnchantFrame:Hide()
end
I'm sure some of you know how I can achieve these things; and thank you so much for your time and effort.