02-05-12, 09:30 AM | #1 |
Grouping / Sorting Question
Hello,
Im trying to make a layout where it doesn't "merge all players". If a player is missing in group 3 i whant it to leave a open spot in group 3 instead of just continue group 4 in that spot. Code:
local raid25 = oUF:SpawnHeader("oUF_Raid25", nil, "custom [@raid26,exists] hide; [@raid11,exists] show; hide", "showRaid", true, "showPlayer", true, "showSolo", Viks["unitframes"].RaidShowSolo, "showParty", Viks["unitframes"].ShowParty, "xoffset", 5, "yOffset", 5, "groupFilter", "1,2,3,4,5,6,7,8", "groupBy", "GROUP", "groupingOrder", "1,2,3,4,5,6,7,8", "sortMethod", "GROUP", "maxColumns", 8, "unitsPerColumn", 5, "columnSpacing", 2, "point", "LEFT", "columnAnchorPoint", "Bottom", "oUF-initialConfigFunction", ([[ self:SetWidth(%d) self:SetHeight(%d) ]]):format(cfg.RH25width, cfg.RH25height)) self:SetActiveStyle("Raid") raid25:SetPoint("CENTER", UIParent, 5, 205) Anyone? Regards |
|
02-05-12, 11:42 AM | #2 |
I do this by spawning a separate header for each group:
https://github.com/Evilpaul/oUF_EP/b...PRaid.lua#L238 |
|
02-11-12, 02:08 PM | #3 | |
LUA Code:
|
||
02-11-12, 03:20 PM | #4 |
02-11-12, 08:26 PM | #5 |
02-11-12, 11:11 PM | #6 |
The spawning of the headers should be fairly generic as long as you make sure the config values are defined for your layout:
Code:
local toStr = tostring local function spawnFunction(self) self:SetActiveStyle('oUF_EPRaid') -- define the raid groups local raid = {} for group = 1, NUM_RAID_GROUPS do local header = self:SpawnHeader(nil, nil, 'party,raid', 'showPlayer', true, 'showParty', true, 'showRaid', true, 'groupFilter', toStr(group), 'yOffset', -config.SPACING, 'oUF-initialConfigFunction', ([[ local unit = ... self:SetWidth(%d) self:SetHeight(%d) ]]):format(config.RAIDUNITWIDTH, config.UNITHEIGHT) ) if group > 1 then header:SetPoint('TOPLEFT', raid[group - 1], 'TOPRIGHT', config.SPACING, 0) else header:SetPoint('TOPLEFT', UIParent, 'BOTTOMLEFT', 15, 350) end raid[group] = header end end |
|
02-11-12, 11:45 PM | #7 |
I meant, what are the errors? If you're going to post that you're getting errors, please post the actual errors. Usually only the first error from the same addon is relevant, as all the following errors are caused by the first, so you can just post the first error.
|
|
02-12-12, 10:01 AM | #8 | |
Code:
Message: ...terface\AddOns\oUF_Aftermathh\oUF_AftermathhRaid.lua:13: Wrong object type for member function Time: 02/12/12 17:00:41 Count: 7 Stack: [C]: ? [C]: ? Interface\FrameXML\RestrictedFrames.lua:604: in function <Interface\FrameXML\RestrictedFrames.lua:603> Interface\FrameXML\RestrictedFrames.lua:742: in function `CallMethod' [string " local header = self:GetParent()..."]:52: in function <[string " local header = self:GetParent()..."]:1> (tail call): ? [C]: ? Interface\FrameXML\RestrictedExecution.lua:441: in function <Interface\FrameXML\RestrictedExecution.lua:412> Interface\FrameXML\SecureGroupHeaders.lua:108: in function <Interface\FrameXML\SecureGroupHeaders.lua:102> Interface\FrameXML\SecureGroupHeaders.lua:158: in function <Interface\FrameXML\SecureGroupHeaders.lua:115> Interface\FrameXML\SecureGroupHeaders.lua:457: in function <Interface\FrameXML\SecureGroupHeaders.lua:381> [C]: in function `Show' Interface\FrameXML\SecureStateDriver.lua:100: in function <Interface\FrameXML\SecureStateDriver.lua:95> Interface\FrameXML\SecureStateDriver.lua:164: in function <Interface\FrameXML\SecureStateDriver.lua:146> [C]: in function `SetAttribute' Interface\FrameXML\SecureStateDriver.lua:11: in function `RegisterAttributeDriver' Interface\AddOns\oUF\ouf.lua:540: in function `SpawnHeader' ...terface\AddOns\oUF_Aftermathh\oUF_AftermathhRaid.lua:199: in function `func' Interface\AddOns\oUF\factory.lua:17: in function <Interface\AddOns\oUF\factory.lua:13> (tail call): ? Locals: <none> |
||
02-12-12, 07:05 PM | #9 |
And what is line 13 in oUF_AftermathhRaid.lua?
|
|
02-13-12, 06:27 AM | #10 |
02-13-12, 07:09 PM | #11 |
You're going to have to post the whole file... unless your code is overwriting the :SetScript method somewhere else, I can't see how that line of code could produce that error.
|
|
02-14-12, 03:00 AM | #12 | |
LUA Code:
|
||
02-14-12, 08:21 AM | #13 |
Are you sure that the file you posted is the one that caused the error you posted previously?
I can't see any way that the 2 match up |
|
02-14-12, 09:20 AM | #14 | |
LUA Code:
Last edited by Aftermathhqt : 02-14-12 at 09:22 AM. |
||
02-16-12, 10:05 AM | #15 |
yj589794's code is good and works but I can't figure a way to make it dependent on raid size (one layout for <25 and another for 25+)
|
|
02-16-12, 11:10 AM | #16 |
For that I think you'd have to generate headers for the <25 raid and >25 raid separately:
Code:
local toStr = tostring local function spawnFunction(self) self:SetActiveStyle('oUF_EPRaid') -- define the raid groups local raid25 = {} for group = 1, NUM_RAID_GROUPS do local header = self:SpawnHeader(nil, nil, 'custom [@raid26,exists] hide;show', 'showPlayer', true, 'showParty', true, 'showRaid', true, 'groupFilter', toStr(group), 'yOffset', -config.SPACING, 'oUF-initialConfigFunction', ([[ local unit = ... self:SetWidth(%d) self:SetHeight(%d) ]]):format(config.RAIDUNITWIDTH, config.UNITHEIGHT) ) if group > 1 then header:SetPoint('TOPLEFT', raid25[group - 1], 'TOPRIGHT', config.SPACING, 0) else header:SetPoint('TOPLEFT', UIParent, 'BOTTOMLEFT', 15, 350) end raid25[group] = header end local raid40 = {} for group = 1, NUM_RAID_GROUPS do local header = self:SpawnHeader(nil, nil, 'custom [@raid26,exists] show;hide', 'showPlayer', true, 'showParty', true, 'showRaid', true, 'groupFilter', toStr(group), 'yOffset', -config.SPACING, 'oUF-initialConfigFunction', ([[ local unit = ... self:SetWidth(%d) self:SetHeight(%d) ]]):format(config.RAIDUNITWIDTH, config.UNITHEIGHT) ) if group > 1 then header:SetPoint('TOPLEFT', raid40[group - 1], 'TOPRIGHT', config.SPACING, 0) else header:SetPoint('TOPLEFT', UIParent, 'BOTTOMLEFT', 15, 350) end raid40[group] = header end end |
|
02-16-12, 12:00 PM | #17 |
Works like a charm but more issues appeared like not being able to do 8x4 raid, centering it in the middle of the screen etc. I will stick to the old model until I figure a smart way to do it ;p Thanks for the help
|
|
02-22-12, 06:24 AM | #18 |
Did some deep dig in. I fixed it!
What i did wrong: LUA Code:
instead of LUA Code:
Thanks for this great feature :-) Doh only one little problem this: LUA Code:
Last edited by Aftermathhqt : 02-22-12 at 07:28 AM. |
|
02-22-12, 07:28 AM | #19 |
Nvm, fixed !
|
|
02-22-12, 10:27 AM | #20 | |
__________________
「貴方は1人じゃないよ」 |
||
WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Grouping / Sorting Question |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|