Thread: Grid roles
View Single Post
12-18-13, 11:54 AM   #8
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Originally Posted by Phanx View Post
Group by role, no, WoW's group header system doesn't support this.*
I was not sure about this statement, as I was sure I had seen some stuff in the UI source about this. I went ahead and experimented a bit and it seems to be possible. (unless the following is completely different than what you meant)

http://pastebin.com/aJBx608W
This creates two sets of simple raid frames. The left one creates one layout for each role so that they get clearly separated. The only flaw with this seems to be that if there's any role that no one has, then that header will still leave a gap. Not sure if there's a way around that. The second one is simply a single layout sorted by role.

I have tried to do something similar in Grid, but it doesn't seem to work properly. Not sure what's going on there.
Code:
GridLayout:AddLayout("Role sort", {
	{
		groupBy = "ASSIGNEDROLE",
		groupingOrder = "TANK,HEALER,DAMAGER,NONE",
		maxColumns = 8,
		-- unitsPerColumn = 5,
	},
})

GridLayout:AddLayout("Role group", {
	{
		roleFilter = "TANK",
		-- maxColumns = 5,
		-- unitsPerColumn = 5,
	},
	{
		roleFilter = "HEALER",
		-- maxColumns = 5,
		-- unitsPerColumn = 5,
	},
	{
		roleFilter = "DAMAGER",
		-- maxColumns = 5,
		-- unitsPerColumn = 5,
	},
	{
		roleFilter = "NONE",
		-- maxColumns = 5,
		-- unitsPerColumn = 5,
	},
})
I have tried various combinations of unitsPerColumn and maxColumns. Not specifying unitsPerColumn just makes it infinitely wide, and maxColumns doesn't seem to do anything. Mostly though a layout never seems to expand over more than one column; it just cuts the first one off at unitPerColumn.
__________________
Grab your sword and fight the Horde!

Last edited by Lombra : 12-18-13 at 11:58 AM.
  Reply With Quote