Okay -- I finally had a chance to look this over and this was my result for holy power (not working):
lua Code:
lib.genHoly = function(self)
if select(2, UnitClass("player")) ~= "PALADIN" then return end
local ClassIcons = {}
for i = 1, 3 do
local Icon = CreateFrame("StatusBar", nil, ClassIcons)
Icon:SetSize(20, 20)
Icon:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 7)
Icon:SetStatusBarTexture(config.statusbar_texture)
Icon:GetStatusBarTexture():SetHorizTile(false)
Icon:SetBackdrop(backdrop)
Icon:SetBackdropColor(0,0,0,1)
if i == 1 then
ClassIcons[i]:SetPoint("LEFT", ClassIcons)
else
ClassIcons[i]:SetPoint("LEFT", ClassIcons[i-1], "RIGHT", 10, 0)
end
ClassIcons[i] = Icon
end
ClassIcons[1]:SetStatusBarColor(0.69, 0.31, 0.31)
ClassIcons[2]:SetStatusBarColor(0.69, 0.31, 0.31)
ClassIcons[3]:SetStatusBarColor(0.65, 0.63, 0.35)
self.ClassIcons = ClassIcons
end
I feel like it's still over complicated, but I'm not sure where to put the frame options in the example given. I must be functionally retarded. How do!?