I'm trying to figure a way to test header units (there are several threads on the issue, but they seem outdated and I wasn't able to find a solution there). So I though I'd just use oUF:SpawnHeader and feed it the same code I use to create the headers in oUF:Factory and alter is a bit so it just displays when I'm solo. This is what I got so far:
lua Code:
SLASH_OUF_RAIN1 = "/raintest"
SlashCmdList.OUF_RAIN = function(group)
if group == "raid" then
local raid = {}
oUF:SetActiveStyle("RainRaid")
for i = 1, 8 do
local header = oUF:SpawnHeader(
"oUF_Rain_TestRaidGroup"..i, nil, "solo",
"showSolo", true,
"showRaid", true,
"yOffset", -7.5,
"oUF-initialConfigFunction", [[
self:SetWidth(64)
self:SetHeight(30)
]]
)
raid[i] = header
if (i == 1) then
header:SetPoint("TOPLEFT", UIParent, 15, -15)
else
header:SetPoint("TOPLEFT", raid[i - 1], "TOPRIGHT", 7.5, 0)
end
end
elseif group == "party" then
oUF:SetActiveStyle("Rain")
local party = oUF:SpawnHeader(
"oUF_Rain_TestParty", nil, "solo",
"showSolo", true,
"showParty", true,
"maxColumns", 4,
"unitsPerColumn", 1,
"columnAnchorPoint", "LEFT",
"columnSpacing", 9.5,
"oUF-initialConfigFunction", [[
self:SetWidth(110)
self:SetHeight(22)
]]
)
party:SetPoint("LEFT", UIParent, "BOTTOM", -231.25, 130)
end
end
This only displays one unit per header though. Is it possible to display the player for every child of the header?