Thread Tools Display Modes
07-15-11, 05:34 PM   #1
Fekete
A Defias Bandit
Join Date: Jan 2007
Posts: 2
Sorting group by role

Can we use the groupby ROLE to sort a party frame so that the tank is always first followed by the healer?

I have tried to use groupby ROLE and I am not finding any documentation on what blizzard expects as a role....
  Reply With Quote
07-17-11, 11:00 AM   #2
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Haven't tried this myself but you should be able to use groupingOrder with NONE, TANK, DAMAGER, HEALER as roles after defining groupBy ROLE

Take a look at http://wowprogramming.com/docs/secur.../Group_Headers
  Reply With Quote
07-18-11, 03:43 AM   #3
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
This how you do it

LUA Code:
  1. local Raid = self:SpawnHeader("oUF_AftermathhRaid", nil, 'solo,party,raid',
  2.             'showPlayer', true,
  3.             'showRaid', true,
  4.             'showParty', false,
  5.             'showSolo', false,
  6.             'xoffset', 12,
  7.             'yOffset', -5,
  8.             'point', 'LEFT',
  9.             'groupBy', 'ROLE',
  10.             'maxColumns', 12,
  11.             'unitsPerColumn', 5,
  12.             'columnSpacing', 12,
  13.             'columnAnchorPoint', 'TOP',
  14.             'oUF-initialConfigFunction', [[
  15.                 self:SetWidth(42)
  16.                 self:SetHeight(38)
  17.                 self:SetScale(1)
  18.             ]]
  19.         )
  20.         Raid:SetPoint('TOPLEFT', UIParent, 10, -9)
  Reply With Quote
07-18-11, 07:40 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Does this work for custom party spawns aswell or only for party that gets spawned without the visibility attribute (ergo: only using solo, party, raid)?

This is how I spawn my raid but it ignores the sorting whatsoever.

lua Code:
  1. --cfg
  2.       attributes = {
  3.         visibility          = "custom [@raid6,exists,group:raid] show;hide", --use "party,raid" to show this in party aswell
  4.         showPlayer          = false,  --make this true to show player in party
  5.         showSolo            = false,  --make this true to show while solo (only works if solo is in visiblity aswell
  6.         showParty           = false,  --make this true to show raid in party
  7.         showRaid            = true,   --show in raid
  8.         point               = "TOP",
  9.         yOffset             = 20,
  10.         xoffset             = 0,
  11.         maxColumns          = 8,
  12.         unitsPerColumn      = 5,
  13.         columnSpacing       = -20,
  14.         columnAnchorPoint   = "LEFT",
  15.       },
  16.  
  17.  
  18.     --spawn raid
  19.     local raid = oUF:SpawnHeader(
  20.       "oUF_DiabloRaidHeader", --name
  21.       nil,
  22.       attr.visibility,
  23.       "showPlayer",         attr.showPlayer,
  24.       "showSolo",           attr.showSolo,
  25.       "showParty",          attr.showParty,
  26.       "showRaid",           attr.showRaid,
  27.       "point",              attr.point,
  28.       "yOffset",            attr.yOffset,
  29.       "xoffset",            attr.xoffset,
  30.       "groupFilter",        "1,2,3,4,5,6,7,8",
  31.       "groupBy",            "GROUP",
  32.       "groupingOrder",      "1,2,3,4,5,6,7,8",
  33.       "sortMethod",         "NAME",
  34.       "maxColumns",         attr.maxColumns,
  35.       "unitsPerColumn",     attr.unitsPerColumn,
  36.       "columnSpacing",      attr.columnSpacing,
  37.       "columnAnchorPoint",  attr.columnAnchorPoint,
  38.      
  39.       "oUF-initialConfigFunction", ([[
  40.         self:SetWidth(%d)
  41.         self:SetHeight(%d)
  42.         self:SetScale(%f)
  43.       ]]):format(64, 64, cfg.units.raid.scale)
  44.     )
  45.     raid:SetPoint(cfg.units.raid.pos.a1,cfg.units.raid.pos.af,cfg.units.raid.pos.a2,cfg.units.raid.pos.x,cfg.units.raid.pos.y)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-18-11 at 07:43 AM.
  Reply With Quote
07-19-11, 12:19 AM   #5
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
MAINTANK and MAINASSIST were the only valid roles last I checked. I would be happy if I were wrong, however.
  Reply With Quote
07-24-11, 05:17 PM   #6
Fekete
A Defias Bandit
Join Date: Jan 2007
Posts: 2
Yeah, looks like this doesn't really work for party frames. I am currently using a modified version of oUF_lumen, but it looks like i need to rewrite my own soon.

Code:
-- Party Frames
		if cfg.show_PartyFrame and not cfg.party_inRaid_instead then
			self:SetActiveStyle('lumen - Party')
			local party = oUF:SpawnHeader('oUF_Party', nil, "custom  [group:party,nogroup:raid][@raid6,noexists,group:raid] show;hide",
			--local party = oUF:SpawnHeader('oUF_Party', nil, "party",
			--local party = oUF:SpawnHeader('oUF_Party', nil, "solo", "showSolo", true,  -- debug
			"showParty", cfg.show_PartyFrame, 
			"showPlayer", cfg.show_Player_inParty,
    		"xoffset", 7,
    		"columnSpacing", 7,
			"groupBy", "ROLE",
    		"groupingOrder", "TANK, HEALER, DAMAGER, DAMAGER, DAMAGER",
			"point", "LEFT",
			"columnAnchorPoint", "TOP",
			"oUF-initialConfigFunction", ([[
			self:SetWidth(%d)
			self:SetHeight(%d)
			self:SetScale(%d)
    		]]):format(cfg.party_width, cfg.party_height, cfg.scale))
			party:SetPoint("CENTER", cfg.party_pos_x, cfg.party_pos_y)
		end
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Sorting group by role


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