-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.lua
79 lines (70 loc) · 1.52 KB
/
config.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
local _, NS = ...
local CreateFrame = CreateFrame
---@class PositionArray
---@field[1] string
---@field[2] string
---@field[3] number
---@field[4] number
---@class ColorArray
---@field r number
---@field g number
---@field b number
---@field a number
---@class GlobalTable : table
---@field lock boolean
---@field test boolean
---@field reverse boolean
---@field healer boolean
---@field showOutside boolean
---@field fontsize number
---@field font string
---@field color ColorArray
---@field position PositionArray
---@field debug boolean
---@class DBTable : table
---@field global GlobalTable
---@class HIR
---@field ADDON_LOADED function
---@field PLAYER_LOGIN function
---@field PLAYER_ENTERING_WORLD function
---@field PLAYER_DEAD function
---@field PLAYER_UNGHOST function
---@field GROUP_ROSTER_UPDATE function
---@field CheckForHealerInRange function
---@field SlashCommands function
---@field frame Frame
---@type HIR
---@diagnostic disable-next-line: missing-fields
local HIR = {}
NS.HIR = HIR
local HIRFrame = CreateFrame("Frame", "HIRFrame")
HIRFrame:SetScript("OnEvent", function(_, event, ...)
if HIR[event] then
HIR[event](HIR, ...)
end
end)
NS.HIR.frame = HIRFrame
NS.DefaultDatabase = {
global = {
lock = false,
test = true,
reverse = false,
healer = true,
showOutside = false,
fontsize = 30,
font = "Friz Quadrata TT",
color = {
r = 1,
g = 1,
b = 1,
a = 1,
},
position = {
"CENTER",
"CENTER",
0,
0,
},
debug = false,
},
}