A Pyroguard Emberseer
Join Date: Feb 2007
Posts: 1,710
|
Originally Posted by Wimpface
It seems i still only get one raid group, i really have no idea what i'm doing wrong but i didn't find anything. This is what i currently have:
Code:
-- Specifies what layout to use for the raid frames
-- 0 = Healermode
-- 1 = DPS mode
local raidlayout = 1
Code:
for i=1,8 do
if(self:GetParent():GetName()=="oUF_Raid"..i) then
if raidlayout == 1 then
self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
self.Info:SetFont(font, fontsize, fontoutline)
self.Info:SetPoint('LEFT', self, 2, 10)
self:Tag(self.Info, '[lowername]')
self.Health:SetHeight(15)
self.Power:Hide()
self:SetBackdrop({
bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
insets = {top = -1.5, left = -1.5, bottom = -1.5, right = -1}
})
self:SetBackdropColor(0, 0, 0)
self:SetAttribute('initial-height', 15)
self:SetAttribute('initial-width', 100)
elseif raidlayout == 0 then
self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
self.Info:SetFont(font, fontsize, fontoutline)
self.Info:SetPoint('TOP', self, 0, -2)
self:Tag(self.Info, '[wmissinghp]')
self.Health:SetHeight(24)
self.Power:Hide()
self:SetBackdrop({
bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
insets = {top = -1, left = -1.5, bottom = -1, right = -1}
})
self:SetBackdropColor(0, 0, 0)
self:SetAttribute('initial-height', 24)
self:SetAttribute('initial-width', 30)
end
end
end
Code:
local Raid = {}
for i=1,5 do -- number of Raid-Groups, here 5
local raid = oUF:Spawn('header', 'oUF_Raid'..i)
raid:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffset', -5)
table.insert(Raid, raid)
if raidlayout == 1 then
if(i==1) then
raid:SetPoint('TOPLEFT', UIParent, 24, -220)
else
raid:SetPoint('TOP', raid[i-1], 'BOTTOM', 0, -20)
end
elseif raidlayout == 0 then
if(i==1) then
raid:SetPoint('TOPLEFT', UIParent, 'TOPRIGHT', -265, -297) -- position of first raidgroup
else
raid:SetPoint('TOPLEFT', Raid[i-1], 'TOPRIGHT', -5, 0)
end
end
raid:Show()
end
EDIT: Also, what does the attribute 'groupFilter' do?
|
first off, drop the two first lines in the createstyle function and use this:
Code:
if(self:GetParent():GetName():match('oUF_Raid')) then
and your second setpoint has 'raid' instead of 'Raid', which makes it anchor to a header, not the table.
|