Repository navigation
Expand file tree
/
Copy pathconfig.lua
More file actions
66 lines (59 loc) · 2.7 KB
/
Copy pathconfig.lua
File metadata and controls
66 lines (59 loc) · 2.7 KB
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
local _, ns = ...
local CreateColor = ns.media.CreateColor
------------------------------------------------------------
-- Config
------------------------------------------------------------
ns.config = {
["general"] = {
["backdrop"] = {
["color"] = CreateColor(0.15, 0.15, 0.15)
},
["border"] = {
["color"] = CreateColor(0.00, 0.00, 0.00),
["size"] = 1
},
["gametooltip"] = true, -- enabled tooltips
["dev"] = false, -- enables dev/development.lua commands
}
}
-- aura frame layout; ns.elements.Auras.Frames adds what each frame shows
local size, spacing = 35, 5
local xOffset, yOffset = 239, 39
local left = { limit = 8, size = size, spacing = spacing, initialAnchor = "BOTTOMRIGHT", ["growth-x"] = "LEFT", ["growth-y"] = "DOWN" }
local right = { limit = 8, size = size, spacing = spacing, initialAnchor = "BOTTOMLEFT", ["growth-x"] = "RIGHT", ["growth-y"] = "DOWN" }
local function Frame(defaults, data)
return Mixin({ enabled = true, type = "Auras" }, defaults, data)
end
-- runs at ADDON_LOADED, after ns.data.Finalize()
function ns.BuildConfig()
local frames = {
["PLAYER_COOLDOWNS"] = {
enabled = true,
type = "Cooldowns",
unit = "player",
anchor = { "CENTER", UIParent, "BOTTOM", 0, 175 },
limit = 8,
size = 38,
max_size = 40,
spacing = 3,
initialAnchor = "CENTER",
["growth-x"] = "CENTER",
["growth-y"] = "CENTER",
spells = ns.data.cooldowns
},
-- LEFT
["PLAYER_DEBUFFS"] = Frame(left, { unit = "player", anchor = { "RIGHT", UIParent, "CENTER", -xOffset, yOffset } }),
["PLAYER_AURAS"] = Frame(left, { unit = "player", anchor = { "RIGHT", UIParent, "CENTER", -xOffset, 0 } }),
["PLAYER_BUFFS"] = Frame(left, { unit = "player", anchor = { "RIGHT", UIParent, "CENTER", -xOffset, -yOffset } }),
-- RIGHT
["TARGET_DEBUFFS"] = Frame(right, { unit = "target", anchor = { "LEFT", UIParent, "CENTER", xOffset, yOffset } }),
["TARGET_AURAS"] = Frame(right, { unit = "target", anchor = { "LEFT", UIParent, "CENTER", xOffset, 0 } }),
["FOCUS_DEBUFFS"] = Frame(right, { unit = "focus", anchor = { "LEFT", UIParent, "CENTER", xOffset, -yOffset } }),
-- CENTER
["BOSS_DEBUFFS"] = Frame(right, { unit = "player", anchor = { "CENTER", UIParent, "CENTER", 0, 160 }, limit = 1, size = math.floor(1.5 * size) })
}
for key, data in next, ns.elements.Auras.Frames(ns.data) do
Mixin(frames[key], data)
end
ns.config.frames = frames
end