Reply
Thread Tools Display Modes
Unread 03-11-14, 07:25 PM   #1
Rainrider
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 315
oUF Test Mode for Header Units

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:
  1. SLASH_OUF_RAIN1 = "/raintest"
  2. SlashCmdList.OUF_RAIN = function(group)
  3.     if group == "raid" then
  4.         local raid = {}
  5.         oUF:SetActiveStyle("RainRaid")
  6.         for i = 1, 8 do
  7.             local header = oUF:SpawnHeader(
  8.                 "oUF_Rain_TestRaidGroup"..i, nil, "solo",
  9.                 "showSolo", true,
  10.                 "showRaid", true,
  11.                 "yOffset", -7.5,
  12.                 "oUF-initialConfigFunction", [[
  13.                     self:SetWidth(64)
  14.                     self:SetHeight(30)
  15.                 ]]
  16.             )
  17.             raid[i] = header
  18.             if (i == 1) then
  19.                 header:SetPoint("TOPLEFT", UIParent, 15, -15)
  20.             else
  21.                 header:SetPoint("TOPLEFT", raid[i - 1], "TOPRIGHT", 7.5, 0)
  22.             end
  23.         end
  24.     elseif group == "party" then
  25.         oUF:SetActiveStyle("Rain")
  26.         local party = oUF:SpawnHeader(
  27.                 "oUF_Rain_TestParty", nil, "solo",
  28.                 "showSolo", true,
  29.                 "showParty", true,
  30.                 "maxColumns", 4,
  31.                 "unitsPerColumn", 1,
  32.                 "columnAnchorPoint", "LEFT",
  33.                 "columnSpacing", 9.5,
  34.                 "oUF-initialConfigFunction", [[
  35.                     self:SetWidth(110)
  36.                     self:SetHeight(22)
  37.                 ]]
  38.             )
  39.         party:SetPoint("LEFT", UIParent, "BOTTOM", -231.25, 130)
  40.     end
  41. end

This only displays one unit per header though. Is it possible to display the player for every child of the header?
Rainrider is offline   Reply With Quote
Unread 03-15-14, 08:52 AM   #2
Smashbolt
A Deviate Faerie Dragon
Join Date: Mar 2010
Posts: 12
I saw another thread that says you can accomplish this by adding the nameList attribute to oUF:SpawnHeader and setting the list to your name a bunch of times, like this...

Code:
local namelist = UnitName("player")
for i = 2,5 do -- or whatever your desired group size is
  namelist = namelist..","..UnitName("player")
end

local party = oUF:SpawnHeader(
  ... The rest of your attributes
  "nameList", namelist
)
And then make sure not to set a groupFilter attribute since it overrides the name list.
Unfortunately, I tried that and all I get is one frame for myself. That thread was about four years ago... I suspect group headers don't allow duplicate units now? Anyone know?
Smashbolt is offline   Reply With Quote
Reply

Go BackWoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF Test Mode for Header Units

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off