Thread Tools Display Modes
02-05-12, 09:30 AM   #1
frohanss
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 40
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)
Tryed different settings but no luck so far.

Anyone?

Regards
  Reply With Quote
02-05-12, 11:42 AM   #2
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
I do this by spawning a separate header for each group:
https://github.com/Evilpaul/oUF_EP/b...PRaid.lua#L238
  Reply With Quote
02-11-12, 02:08 PM   #3
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by yj589794 View Post
I do this by spawning a separate header for each group:
https://github.com/Evilpaul/oUF_EP/b...PRaid.lua#L238
Doesn't work for me O.o Just getting 19 pages of errors.

LUA Code:
  1. oUF:RegisterStyle('Aftermathh_Raid', RaidFrames)
  2. oUF:Factory(function(self)
  3.     self:SetActiveStyle('Aftermathh_Raid')
  4.    
  5.     local toStr = tostring
  6.    
  7.     if AftermathhUI.ouf.showraid == true then
  8.         for group = 1, NUM_RAID_GROUPS do
  9.             local Raid = self:SpawnHeader("AftermathhRaidGrid", nil, 'solo,party,raid',
  10.                 'showPlayer', true,
  11.                 'showRaid', true,
  12.                 'showParty', true,
  13.                 'showSolo', true,
  14.                 'xoffset', 7,
  15.                 'yOffset', 0,
  16.                 'point', 'LEFT',
  17.                 'groupFilter', toStr(group),
  18.                 'groupingOrder', '1,2,3,4,5,6,7,8',
  19.                 'groupBy', 'GROUP',
  20.                 'sortMethod', 'GROUP',
  21.                 'maxColumns', 5,
  22.                 'unitsPerColumn', 5,
  23.                 'columnSpacing', 6,
  24.                 'columnAnchorPoint', 'TOP',
  25.                 'oUF-initialConfigFunction', [[
  26.                     self:SetWidth(59)
  27.                     self:SetHeight(38)
  28.                     self:SetScale(1)
  29.                 ]]
  30.             )  
  31.             Raid:SetPoint('LEFT', UIParent, 221, -54)
  32.         end    
  33.     end
  34. end)
  Reply With Quote
02-11-12, 03:20 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Game92 View Post
errors
What? Where?
  Reply With Quote
02-11-12, 08:26 PM   #5
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Phanx View Post
What? Where?
When i try the code yj589794 uses for this.
  Reply With Quote
02-11-12, 11:11 PM   #6
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
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
  Reply With Quote
02-11-12, 11:45 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Game92 View Post
When i try the code yj589794 uses for this.
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.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Grouping / Sorting Question


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