-
Notifications
You must be signed in to change notification settings - Fork 2
/
layout.lua
145 lines (131 loc) · 3.66 KB
/
layout.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
local layoutName, ns = ...
local config = ns.config
oUF:Factory(function(self)
self:SetActiveStyle(layoutName .. '_Primary')
local player = self:Spawn('player')
player:SetPoint('CENTER', -210, -215)
local target = self:Spawn('target')
target:SetPoint('CENTER', 210, -215)
self:SetActiveStyle(layoutName .. '_Secondary')
self:Spawn('pet'):SetPoint('BOTTOMLEFT', player, 'TOPLEFT', 0, 0)
self:Spawn('focus'):SetPoint('BOTTOMRIGHT', player, 'TOPRIGHT', 0, 0)
self:Spawn('focustarget'):SetPoint('BOTTOMLEFT', target, 'TOPLEFT', 0, 0)
self:Spawn('targettarget'):SetPoint('BOTTOMRIGHT', target, 'TOPRIGHT', 0, 0)
local boss = {}
for i = 1, _G.MAX_BOSS_FRAMES do
boss[i] = self:Spawn('boss' .. i)
if i == 1 then
boss[i]:SetPoint('TOP', UIParent, 'TOP', 0, -25)
else
boss[i]:SetPoint('TOP', boss[i - 1], 'BOTTOM', 0, 0)
end
end
if config.showMTA then
-- stylua: ignore start
local mainTanksAndAssists = self:SpawnHeader(
nil, nil, 'raid',
'showRaid', true,
'groupFilter', 'MAINTANK,MAINASSIST',
'groupBy', 'ROLE',
'groupingOrder', 'MAINTANK,MAINASSIST',
'oUF-initialConfigFunction', [[
self:SetWidth(120)
self:SetHeight(32)
]]
)
-- stylua: ignore end
mainTanksAndAssists:SetPoint('BOTTOMLEFT', UIParent, 'LEFT', 150, -245)
if config.showMTATargets then
-- stylua: ignore start
local mainTanksAndAssistsTargets = self:SpawnHeader(
nil, nil, 'raid',
'showRaid', true,
'groupFilter', 'MAINTANK,MAINASSIST',
'groupBy', 'ROLE',
'groupingOrder', 'MAINTANK,MAINASSIST',
'oUF-initialConfigFunction', [[
self:SetWidth(120)
self:SetHeight(32)
self:SetAttribute('unitsuffix', 'target')
]]
)
-- stylua: ignore end
mainTanksAndAssistsTargets:SetPoint('TOPLEFT', mainTanksAndAssists, 'TOPRIGHT')
end
end
self:SetActiveStyle(layoutName .. '_Group')
if config.showParty then
-- stylua: ignore start
local party = self:SpawnHeader(
nil, nil, 'party',
'showParty', true,
'maxColumns', 4,
'unitsPerColumn', 1,
'columnAnchorPoint', 'LEFT',
'oUF-initialConfigFunction', [[
self:SetWidth(80)
self:SetHeight(40)
]]
)
-- stylua: ignore end
party:SetPoint('LEFT', UIParent, 'BOTTOM', -160, 130)
if config.showPartyPets then
-- stylua: ignore start
local partyPets = self:SpawnHeader(
nil, nil, 'party',
'showParty', true,
'maxColumns', 4,
'unitsPerColumn', 1,
'columnAnchorPoint', 'LEFT',
'oUF-initialConfigFunction', [[
self:SetWidth(80)
self:SetHeight(20)
self:SetAttribute('unitsuffix', 'pet')
]]
)
-- stylua: ignore end
partyPets:SetPoint('TOPLEFT', party, 'BOTTOMLEFT')
end
if config.showPartyTargets then
-- stylua: ignore start
local partyTargets = self:SpawnHeader(
nil, nil, 'party',
'showParty', true,
'maxColumns', 4,
'unitsPerColumn', 1,
'columnAnchorPoint', 'LEFT',
'oUF-initialConfigFunction', [[
self:SetWidth(80)
self:SetHeight(20)
self:SetAttribute('unitsuffix', 'target')
]]
)
-- stylua: ignore end
partyTargets:SetPoint('TOPLEFT', party, 'BOTTOMLEFT', 0, -20)
end
end
if config.showRaid then
local raid = {}
for group = 1, _G.NUM_RAID_GROUPS do
-- stylua: ignore start
raid[group] = self:SpawnHeader(
nil, nil, 'raid',
'showRaid', true,
'maxColumns', 5,
'unitsPerColumn', 1,
'columnAnchorPoint', 'LEFT',
'groupFilter', group,
'oUF-initialConfigFunction', [[
self:SetWidth(80)
self:SetHeight(40)
]]
)
-- stylua: ignore end
if group == 1 then
raid[group]:SetPoint('TOPLEFT', UIParent, 15, -15)
else
raid[group]:SetPoint('TOPLEFT', raid[group - 1], 'BOTTOMLEFT')
end
end
end
end)