Oh the splitting of the group in different raid headers per group is nice.
@Game92
It's no wonder that it has not worked. You choosed a global unique name for your header which is the same for every group spawn. Normally you put in the group id into the string to make it unique. Using nil will make oUF choose a string.
Like:
Code:
"Aftermathh_Raid25Group"..group
I added it to my layout aswell.
config attributes
Code:
attributes = {
visibility1 = "custom [@raid11,exists] hide;[group:raid] show; hide", --use "party,raid" to show this in party aswell
visibility2 = "custom [@raid26,exists] hide; [@raid11,exists] show; hide", --special display for raid > 20 players (lower scale)
visibility3 = "custom [@raid26,exists] show; hide", --special display for raid > 30 players (lower scale)
showPlayer = false, --make this true to show player in party
showSolo = false, --make this true to show while solo (only works if solo is in visiblity aswell
showParty = false, --make this true to show raid in party
showRaid = true, --show in raid
point = "TOP",
yOffset = 15,
xoffset = 0,
maxColumns = 8,
unitsPerColumn = 5,
columnSpacing = -20,
columnAnchorPoint = "LEFT",
},
spawn
lua Code:
if cfg.units.raid.show then
--register style
oUF:RegisterStyle("diablo:raid", createStyle)
oUF:SetActiveStyle("diablo:raid")
local attr = cfg.units.raid.attributes
local function getRaidScale(id)
if id == 1 then
return cfg.units.raid.scale
elseif id == 2 then
return cfg.units.raid.scale*0.9
else
return cfg.units.raid.scale*0.75
end
end
local function getRaidVisibility(id)
if id == 1 then
return attr.visibility1
elseif id == 2 then
return attr.visibility2
else
return attr.visibility3
end
end
local raid, group, i, j
for i=1, 3 do
raid = {}
for j=1, NUM_RAID_GROUPS do
group = oUF:SpawnHeader(
"oUF_DiabloRaid"..i.."Group"..j, --name of raid group header
nil,
getRaidVisibility(i),
"showPlayer", attr.showPlayer,
"showSolo", attr.showSolo,
"showParty", attr.showParty,
"showRaid", attr.showRaid,
"point", attr.point,
"yOffset", attr.yOffset,
"xoffset", attr.xoffset,
--"groupFilter", "1,2,3,4,5,6,7,8",
"groupFilter", tostring(j),
"groupBy", "GROUP",
"groupingOrder", "1,2,3,4,5,6,7,8",
"sortMethod", "NAME",
--"maxColumns", attr.maxColumns,
"unitsPerColumn", attr.unitsPerColumn,
--"columnSpacing", attr.columnSpacing,
--"columnAnchorPoint", attr.columnAnchorPoint,
"oUF-initialConfigFunction", ([[
self:SetWidth(%d)
self:SetHeight(%d)
]]):format(128, 64)
)
group:SetScale(getRaidScale(i))
if j == 1 then
group:SetPoint(cfg.units.raid.pos.a1,cfg.units.raid.pos.af,cfg.units.raid.pos.a2,cfg.units.raid.pos.x,cfg.units.raid.pos.y)
else
if attr.columnAnchorPoint == "TOP" then
group:SetPoint("TOPLEFT", raid[j-1], "BOTTOMLEFT", 0, attr.columnSpacing)
elseif attr.columnAnchorPoint == "BOTTOM" then
group:SetPoint("BOTTOMLEFT", raid[j-1], "TOPLEFT", 0, attr.columnSpacing)
elseif attr.columnAnchorPoint == "LEFT" then
group:SetPoint("TOPLEFT", raid[j-1], "TOPRIGHT", attr.columnSpacing, 0)
else
group:SetPoint("TOPRIGHT", raid[j-1], "TOPLEFT", attr.columnSpacing, 0)
end
end
raid[j] = group
end
end
end
I spawn 3 different raid layouts in 3 different sizes.
Currently testing.
Had some scaling issues but after removing the scale from the UnitButton and adding it to the group it worked like charm.