Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-11-14, 07:25 PM   #1
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
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?
  Reply With Quote
 

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


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