I finally got my rune frames working, thanks Mischback for the jumping off point.
Code:
local i
local runes = CreateFrame('Frame', nil, self)
for i = 1, 6 do
runes[i] = CreateFrame('StatusBar', nil, runes)
runes[i]:SetHeight(5)
runes[i]:SetWidth((cfg.width-5)/6)
runes[i]:SetStatusBarTexture(cfg.texture, 'BORDER')
runes[i]:SetBackdrop(cfg.backdrop)
runes[i]:SetBackdropColor(0, 0, 0, 1)
runes[i]:SetBackdropBorderColor(0, 0, 0, 0)
runes[i].bg = runes[i]:CreateTexture(nil, 'BACKGROUND')
runes[i].bg:SetAllPoints(runes[i])
runes[i].bg:SetTexture(cfg.texture)
runes[i].bg:SetVertexColor(0.3, 0.3, 0.3, 0.5)
if (i == 1) then
runes[i]:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, 5)
--runes[i]:SetPoint('BOTTOMLEFT', runes, 'BOTTOMLEFT', 0,0)
--The above does not work for some reason.
else
runes[i]:SetPoint('LEFT', runes[i-1], 'RIGHT', 1, 0)
end
end
self.Runes = runes
documentation for things in other files.
Code:
cfg.width = 155
cfg.texture = [=[Interface\ChatFrame\ChatFrameBackground]=]
cfg.backdrop = {
bgFile = TEXTURE, insets = {top = -1, bottom = -1, left = -1, right = -1}
}
The odd bit for me was that I couldn't SetPoint() the runes[i] to runes, but had to do it to self. I'm also getting a space for runeframes in all of my units, not just player when a DK.
http://github.com/cynyr/oUF_Cynyr/tree/oUF1.4 for current full source. It's basicly lily, with narrower frames, no buffs/debuffs, and a rune bar for DKs. Master is a 1.3 p3lim modification.