I'm currently re-writing my raidframe to something new and i'm unable to do one thing. I need a little bit of help. It is possible to... with oUF 1.4... I think i'm gonna explain it first.
I want 4 layouts based on how many people are currently in raid, into a single file, with 1 style. This is my code at the bottom at the moment:
Code:
local raid = oUF:SpawnHeader('TukuiRaid', nil, 'raid,party','showPlayer', true,'showParty', true,'showRaid', true,
'xoffset', 4,'yOffset', -4,'point', "LEFT",'groupFilter', '1,2,3,4,5,6,7,8','groupingOrder', '1,2,3,4,5,6,7,8','groupBy', 'GROUP',
'maxColumns', 40,'unitsPerColumn', 1,'columnSpacing', 5,'columnAnchorPoint', "TOP"
)
raid:SetPoint('TOPLEFT', UIParent, 15, -300)
I want to rescale and reposition all units based on how many peoples (with a local Var) are currently in the raid based on these events:
Code:
PLAYER_LOGIN
RAID_ROSTER_UPDATE
PARTY_LEADER_CHANGED
PARTY_MEMBERS_CHANGED
Repositionning is easy, we just need to reposition the header with SetPoint(). It's easy too if we rescale the header, but it's not really what i want, because I need to rescale all units from the start instead of the header to have a 1px pixel perfect border on any scale and any units. Example, actually i'm in raid10, if a unit 11 enter the raid, I want units 1 to 11 rescaled and repositionned from the start.
Does there is a way to tell the layout to rescale all units from unit #1 when numraid or numparty (see below example) change?
Code:
TukuiDB.RaidScale = function(self, event, unit)
local numraid = GetNumRaidMembers()
local numparty = GetNumPartyMembers()
if (numparty <= 5) or (numraid <= 5) then
TukuiDB.RaidScaling = 1.2
elseif numraid > 5 and numraid <=10 then
TukuiDB.RaidScaling = 1
(...)
end
Thank you.
Hope you'll understand, english is not my native language.