From oUF_Caellian
Code:
self.CPoints = {}
self.CPoints.unit = PlayerFrame.unit
for i = 1, 5 do
self.CPoints[i] = self.Power:CreateTexture(nil, "OVERLAY")
self.CPoints[i]:SetHeight(12)
self.CPoints[i]:SetWidth(12)
self.CPoints[i]:SetTexture(bubbleTex)
if i == 1 then
self.CPoints[i]:SetPoint("LEFT")
self.CPoints[i]:SetVertexColor(0.69, 0.31, 0.31)
else
self.CPoints[i]:SetPoint("LEFT", self.CPoints[i-1], "RIGHT", 1)
end
end
self.CPoints[2]:SetVertexColor(0.69, 0.31, 0.31)
self.CPoints[3]:SetVertexColor(0.65, 0.63, 0.35)
self.CPoints[4]:SetVertexColor(0.65, 0.63, 0.35)
self.CPoints[5]:SetVertexColor(0.33, 0.59, 0.33)
self:RegisterEvent("UNIT_COMBO_POINTS", UpdateCPoints)
end
Why not do something like this but instead of the texture use the backdrop?