-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConfig.lua
More file actions
74 lines (67 loc) · 1.79 KB
/
Config.lua
File metadata and controls
74 lines (67 loc) · 1.79 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
67
68
69
70
71
72
73
74
local mod = LibStub("AceAddon-3.0"):GetAddon("Meeyra's Lockout Tracker")
local L = LibStub("AceLocale-3.0"):GetLocale("MeeyrasLockouts", false)
local R = LibStub("AceConfigRegistry-3.0")
local C = LibStub("AceConfigDialog-3.0")
local DBOpt = LibStub("AceDBOptions-3.0")
mod.defaults = {
profile = {
minimapIcon = {}
}
}
mod.options = {
main = {
type = "group",
name = L["Meeyra's Lockout Tracker"],
handler = mod,
set = "SetProfileParam",
get = "GetProfileParam",
args = {
minimapIcon = {
type = "toggle",
name = L["Show Minimap Icon"],
desc = L["Whether or not to show an icon on the minimap in addition or instead of using an LDB display"],
set = function(_, value)
mod.gdb.minimapIcon.hide = not value
mod:ApplyProfile()
end,
get = function() return not mod.gdb.minimapIcon.hide end
},
}
}
}
function mod:InitializeConfig()
local DBOpt = LibStub("AceDBOptions-3.0")
mod.options.profile = DBOpt:GetOptionsTable(self.db)
mod.main = mod:OptReg("Meeyra's Lockout Tracker", mod.options.main)
mod.text = mod:OptReg(": Profiles", mod.options.profile, L["Profiles"])
mod:OptReg("Meeyra's Lockout Tracker", {
name = L["Command Line"],
type = "group",
args = {
icon = {
type = "execute",
name = L["Toggle display of minimap button"],
func = function()
self.gdb.minimapIcon.hide = not self.gdb.minimapIcon.hide
mod:ApplyProfile(true)
end,
dialogHidden = true
},
list = {
type = "execute",
name = L["List lockouts in chat window."],
func = function()
mod:PrintLockouts()
end
},
announce = {
type = "execute",
name = L["List lockouts in party or raid chat."],
func = function()
mod:SendLockoutsToChat()
end
}
}
}, nil, { "lockouts", "meeyra" })
mod:ApplyProfile(true)
end