WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   oUF Test Mode for Header Units (https://www.wowinterface.com/forums/showthread.php?t=49089)

Rainrider 03-11-14 07:25 PM

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?

Smashbolt 03-15-14 08:52 AM

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?


All times are GMT -6. The time now is 04:13 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI