-
Notifications
You must be signed in to change notification settings - Fork 17
/
GridLayoutLayouts.lua
128 lines (109 loc) · 2.64 KB
/
GridLayoutLayouts.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
--[[
Created by Grid2 original authors, modified by Michael
--]]
local L = LibStub("AceLocale-3.0"):GetLocale("Grid2")
local groupFilters = Grid2Layout.groupFilters
local DEFAULT_ROLE = Grid2.versionCli<30000 and 'ROLE' or 'ASSIGNEDROLE'
local DEFAULT_ROLE_ORDER = Grid2.versionCli<30000 and 'MAINTANK,MAINASSIST,NONE' or 'TANK,HEALER,DAMAGER,NONE'
local DEFAULT_GROUP_ORDER = "WARRIOR,DEATHKNIGHT,DEMONHUNTER,ROGUE,MONK,PALADIN,DRUID,SHAMAN,PRIEST,MAGE,WARLOCK,HUNTER,EVOKER"
local DEFAULT_PET_ORDER = "HUNTER,WARLOCK,MAGE,DEATHKNIGHT,DRUID,PRIEST,SHAMAN,MONK,PALADIN,DEMONHUNTER,ROGUE,WARRIOR,EVOKER"
local META_ALL = { solo = true, party = true, arena = true, raid = true }
local META_RAID = { raid = true }
local PETS_GROUP = {
type = "pet",
maxColumns = "auto",
groupBy = "CLASS",
groupingOrder = DEFAULT_PET_ORDER,
}
-- general layouts
Grid2Layout:AddLayout("None", {
meta = META_ALL,
empty = true
})
Grid2Layout:AddLayout("By Group", {
meta = META_ALL,
})
Grid2Layout:AddLayout("By Group w/Pets", {
meta = META_ALL,
[1] = "auto",
[2] = PETS_GROUP,
})
Grid2Layout:AddLayout("By Group & Class", {
meta = META_ALL,
defaults = {
groupBy = "CLASS",
groupingOrder = DEFAULT_GROUP_ORDER,
sortMethod = "NAME",
},
})
Grid2Layout:AddLayout("By Group & Class w/Pets", {
meta = META_ALL,
defaults = {
groupBy = "CLASS",
groupingOrder = DEFAULT_GROUP_ORDER,
sortMethod = "NAME",
},
[1] = "auto",
[2] = PETS_GROUP,
})
Grid2Layout:AddLayout("By Class", {
meta = META_ALL,
[1]= {
maxColumns = 8,
groupFilter = "auto",
groupBy = "CLASS",
groupingOrder = DEFAULT_GROUP_ORDER,
sortMethod = "NAME",
}
})
Grid2Layout:AddLayout("By Class w/Pets", {
meta = META_ALL,
[1]= {
maxColumns = 8,
groupFilter = "auto",
groupBy = "CLASS",
groupingOrder = DEFAULT_GROUP_ORDER,
sortMethod = "NAME",
},
[2] = PETS_GROUP,
})
Grid2Layout:AddLayout("By Role", {
meta = META_ALL,
[1] = {
maxColumns = 8,
groupFilter = "auto",
groupBy = DEFAULT_ROLE,
groupingOrder = DEFAULT_ROLE_ORDER,
sortMethod = "NAME",
},
})
Grid2Layout:AddLayout("By Role w/Pets", {
meta = META_ALL,
[1] = {
maxColumns = 8,
groupFilter = "auto",
groupBy = DEFAULT_ROLE,
groupingOrder = DEFAULT_ROLE_ORDER,
sortMethod = "NAME",
},
[2] = PETS_GROUP,
})
-- raid only layouts
Grid2Layout:AddLayout("By Group & Role", {
meta = META_RAID,
defaults = {
groupBy = DEFAULT_ROLE,
groupingOrder = DEFAULT_ROLE_ORDER,
sortMethod = "NAME",
},
})
Grid2Layout:AddLayout("By Group & Role w/Pets", {
meta = META_RAID,
defaults = {
groupBy = DEFAULT_ROLE,
groupingOrder = DEFAULT_ROLE_ORDER,
sortMethod = "NAME",
},
[1] = "auto",
[2] = PETS_GROUP,
})