Hey,
I asked about how I could change the backdrop and border of the frames auras in his addon thread but I never received a reply. I thought I might try here.
Since his frame has some Caellian code, I was trying to make the auras have the same border as oUF_Caellian. Sadly, I can't seem to get it right.
This is the section I tried to integrate.
(From oUF_Freeb)
Code:
local auraIcon = function(self, button, icons)
local count = button.count
count:ClearAllPoints()
count:SetPoint("BOTTOMRIGHT", 3, -3)
icons.disableCooldown = true
button.icon:SetTexCoord(.1, .9, .1, .9)
button.bg = CreateFrame("Frame", nil, button)
button.bg:SetPoint("TOPLEFT", button, "TOPLEFT", -4, 4)
button.bg:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 4, -4)
button.bg:SetFrameStrata("LOW")
button.bg:SetBackdrop(frameBD)
button.bg:SetBackdropColor(0, 0, 0, 0)
button.bg:SetBackdropBorderColor(0, 0, 0)
local remaining = button:CreateFontString(nil, "OVERLAY")
remaining:SetPoint("TOPLEFT", -3, 2)
remaining:SetFont("FONTS\\FRIZQT__.ttf", 12, "OUTLINE")
remaining:SetTextColor(.8, .8, .8)
button.remaining = remaining
if self.unit == "player" then
button:SetScript("OnMouseUp", CancelAura)
end
end
( oUF_Caellian)
Code:
local CreateAura = function(self, button, icons)
button.backdrop = CreateFrame("Frame", nil, button)
button.backdrop:SetPoint("TOPLEFT", button, "TOPLEFT", -3.5, 3)
button.backdrop:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 4, -3.5)
button.backdrop:SetFrameStrata("BACKGROUND")
button.backdrop:SetBackdrop {
edgeFile = glowTex, edgeSize = 5,
insets = {left = 3, right = 3, top = 3, bottom = 3}
}
button.backdrop:SetBackdropColor(0, 0, 0, 0)
button.backdrop:SetBackdropBorderColor(0, 0, 0)
button.count:SetPoint("BOTTOMRIGHT", 1, 1.5)
button.count:SetJustifyH("RIGHT")
button.count:SetFont(fontn, 8, "THICKOUTLINE")
button.count:SetTextColor(0.84, 0.75, 0.65)
button.cd.noOCC = true
button.cd.noCooldownCount = true
icons.disableCooldown = true
button.overlay:SetTexture(buttonTex)
button.overlay:SetPoint("TOPLEFT", button, "TOPLEFT", -1, 1)
button.overlay:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 1, -1)
button.overlay:SetTexCoord(0, 1, 0.02, 1)
button.overlay.Hide = function(self) end
if icons ~= self.Enchant then
button.remaining = SetFontString(button, fontn, 8, "OUTLINE")
if self.unit == "player" then
button:SetScript("OnMouseUp", CancelAura)
end
else
button.remaining = SetFontString(button, fontn, 8, "OUTLINE")
button.overlay:SetVertexColor(0.33, 0.59, 0.33)
end
button.remaining:SetPoint("TOPLEFT", 1, -1)
end
It's a great little unitframe and this is the only thing that is preventing me from using it.
Can anyone help me with this task?