Originally Posted by zork
haste stated that spawning the party should be possible without using the visibility attribute which is the third attribute of the party header spawn.
Here is the code to spawn a party without the visibility attribute but with a seperate toggle. That will fix the party flickering for now.
Full code including toggle:
lua Code:
[code] if cfg.units.party.show then oUF:RegisterStyle("diablo:party", createStyle) oUF:SetActiveStyle("diablo:party") local party = oUF:SpawnHeader( "oUF_DiabloPartyHeader", nil, nil, --"solo,party", "showSolo", cfg.units.party.showsolo, --debug "showParty", true, "showPlayer", true, "point", "LEFT", "oUF-initialConfigFunction", ([[ self:SetWidth(%d) self:SetHeight(%d) self:SetScale(%f) ]]):format(128, 64, cfg.units.party.scale) ) party:SetPoint(cfg.units.party.pos.a1,cfg.units.party.pos.af,cfg.units.party.pos.a2,cfg.units.party.pos.x,cfg.units.party.pos.y) party:Show() local toggle = CreateFrame("Frame") toggle:RegisterEvent("PLAYER_LOGIN") toggle:RegisterEvent("RAID_ROSTER_UPDATE") toggle:RegisterEvent("PARTY_LEADER_CHANGED") toggle:RegisterEvent("PARTY_MEMBER_CHANGED") toggle:SetScript("OnEvent", function(self) if(InCombatLockdown()) then self:RegisterEvent("PLAYER_REGEN_ENABLED") else self:UnregisterEvent("PLAYER_REGEN_ENABLED") if(GetNumRaidMembers() > 0) then party:Hide() else party:Show() end end end) end [/code]
|
Im gonna try this when i come home, i wanted to get this damn flickering away but, i've tryed the previous once that where posted, but didnt work really.
hmm it doesnt seem to work for me.
here is my party code
Code:
oUF:RegisterStyle('Aftermathh', func)
oUF:Factory(function(self)
oUF:SetActiveStyle'Aftermathh'
self:Spawn'player':SetPoint('BOTTOMLEFT', UIParent, 196, 182)
self:Spawn'target':SetPoint('BOTTOMRIGHT', UIParent, -237, 184)
self:Spawn'targettarget':SetPoint('RIGHT', UIParent, -75, -189)
self:Spawn'focus':SetPoint('LEFT', UIParent, 108, -45)
self:Spawn'focustarget':SetPoint('LEFT', UIParent, 17, -3)
self:Spawn'pet':SetPoint('LEFT', UIParent, 105, -156)
local party = self:SpawnHeader('AftermathhParty', nil, 'party,solo',
'showParty', true,
'showPlayer', false,
'showSolo', false,
'xoffset', 12,
'yOffset', -52,
'oUF-initialConfigFunction', [[
self:SetHeight(27)
self:SetWidth(150)
self:SetScale(0.95)
]]
)
party:SetPoint('TOPLEFT', UIParent, 10, -20)
party:Show()
local toggle = CreateFrame("Frame")
toggle:RegisterEvent("PLAYER_LOGIN")
toggle:RegisterEvent("RAID_ROSTER_UPDATE")
toggle:RegisterEvent("PARTY_LEADER_CHANGED")
toggle:RegisterEvent("PARTY_MEMBER_CHANGED")
toggle:SetScript("OnEvent", function(self)
if(InCombatLockdown()) then
self:RegisterEvent("PLAYER_REGEN_ENABLED")
else
self:UnregisterEvent("PLAYER_REGEN_ENABLED")
if(GetNumRaidMembers() > 0) then
party:Hide()
else
party:Show()
end
end
end)
if bossframes then
local boss = {}
for i = 1, MAX_BOSS_FRAMES do
local unit = self:Spawn("boss"..i, "oUF_AftermathhBoss"..i)
if i==1 then
unit:SetPoint("CENTER", 500, 200)
else
unit:SetPoint("TOPLEFT", boss[i-1], "BOTTOMLEFT", 0, -10)
end
boss[i] = unit
end
end
end)