-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptions.lua
More file actions
61 lines (58 loc) · 1.69 KB
/
Options.lua
File metadata and controls
61 lines (58 loc) · 1.69 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
local addonName, addonTable = ...
setfenv(1, _G.SlackHacks)
-- Documentation for AceConfig "Options" tables: https://www.wowace.com/projects/ace3/pages/ace-config-3-0-options-tables
options = {
type = "group",
args = {
enable = {
name = "Enabled",
desc = "Enable/disable " .. addonName,
type = "toggle",
get = function() return Self:IsEnabled() end,
set = function() if Self:IsEnabled() then Self:Disable() else Self:Enable() end end,
order = 0 -- first
},
debug = {
name = "Enable Debugging",
desc = "Enable debugging logs and stuff",
type = "toggle",
get = function() return db.global.isDebugging end,
set = function()
db.global.isDebugging = not db.global.isDebugging
if db.global.isDebugging then
print("SlackHacks Debugging ON")
else
print("SlackHacks Debugging OFF")
end
end,
},
bind = {
type = "execute",
name = "Set Bindings",
desc = "Set binding presets for current character's class and spec.",
func = function() setBindings() end,
hidden = true -- Current just used by me
},
reset = {
type = "execute",
name = "Reset All Data",
desc = "DANGER: Wipes all settings! Cannot be undone!",
func = function()
db:ResetDB()
print("SlackHacks: ALL DATA WIPED")
end,
confirm = true
}
},
-- mount = {
-- type = "group",
-- name = "Mount",
-- desc = "Mount binding configuration",
-- func = function()
-- -- mount()
-- print("SlackHacks: mounting...")
-- end,
-- args = {
-- }
-- }
}