Hi, i know this kinda thing has been asked before 'cuz I have found a lot of info on it but it's really not clear to me (i'm a noob), I'm wondering about spawning party frames differently, easier to show you how:
partymember3 partymember4
partymember1 partymember2
or
partymember2 partymember4
partymember1 partymember3
what i have so far for spawning:
Code:
oUF:RegisterStyle("oUF_Aerials", func)
oUF:SetActiveStyle("oUF_Aerials")
local player = oUF:Spawn("player", "oUF_Player")
player:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 50, 100)
player:SetScale(scale)
local target = oUF:Spawn("target", "oUF_Target")
target:SetPoint("CENTER", 0, -180)
local pet = oUF:Spawn("pet", "oUF_Pet")
pet:SetPoint("TOPLEFT", player, "RIGHT", 8, -2)
local pettarget = oUF:Spawn("pettarget", "oUF_PetTarget")
pettarget:SetPoint("LEFT", pet, "RIGHT", 4, 0)
local tot = oUF:Spawn("targettarget", "oUF_TargetTarget")
tot:SetPoint("LEFT", target, "RIGHT", 8, 0)
local focus = oUF:Spawn("focus", "oUF_Focus")
focus:SetPoint("BOTTOMLEFT", player, "RIGHT", 8, 2)
local tof = oUF:Spawn("focustarget", "oUF_FocusTarget")
tof:SetPoint("LEFT", focus, "RIGHT", 4, 0)
local party = oUF:Spawn("header", "oUF_Party")
party:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 50, 230)
party:SetManyAttributes(
"showParty", true,
'point', "BOTTOMLEFT",
"yOffset", 60,
"xOffset", -150,
'sortDir', "RIGHT",
'maxColumns', 2,
'unitsPerColumn', 2,
'columnAnchorPoint', 'LEFT',
'columnSpacing', 120
)
party:SetAttribute("template", "oUF_AerialsParty")
--party:SetScale(scaleP)
party:Show()
local raid = {}
for i = 1, 8 do
local raidgroup = oUF:Spawn('header', 'oUF_Raid'..i)
raidgroup:SetManyAttributes(
'groupFilter', tostring(i),
'showRaid', true,
'yOffSet', -1,
"point", "TOP",
"template", "oUF_AerialsRaid"
)
table.insert(raid, raidgroup)
if(i==1) then
raidgroup:SetPoint('BOTTOMLEFT', UIParent, 'BOTTOMLEFT', 20, 220)
elseif(i==5) then
raidgroup:SetPoint('BOTTOMLEFT', UIParent, 'BOTTOMLEFT', 250, 220)
else
raidgroup:SetPoint('BOTTOM', raid[i-1], 'TOP', 0, 10)
end
end
-- party toggle in raid
local partyToggle = CreateFrame('Frame')
partyToggle:RegisterEvent('PLAYER_LOGIN')
partyToggle:RegisterEvent('RAID_ROSTER_UPDATE')
partyToggle:RegisterEvent('PARTY_LEADER_CHANGED')
partyToggle:RegisterEvent('PARTY_MEMBERS_CHANGED')
partyToggle:SetScript('OnEvent', function(self)
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
if(GetNumRaidMembers() > 0) then
party:Show()
for i,v in ipairs(raid) do v:Hide() end
else
party:Show()
for i,v in ipairs(raid) do v:Hide() end
end
end
end)
the positions work... party members show where I want them, but... they won't show right if i'm in combat when I join the party. also, if i'm in combat when I join, the frames are not clickable until I reloadui (took 2 reloads actually for some odd reason).
I was wondering if it's possible to force the locations of each frame to be valid when logging in (even if not in a party) or if it's possible to spawn them individually with still using the template in the xml and if either of those would actually make it work right.
i've seen some layouts put some of the attributes in the RegisterStyle line, but i'm not sure what all can be put in there (pretty sure when I tried that it caused some weird errors).