forked from Silencer2K/wow-action-bar-profiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Config.lua
48 lines (46 loc) · 1.68 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
local addonName, addon = ...
local L = LibStub("AceLocale-3.0"):GetLocale(addonName)
function addon:GetOptions()
self.options = self.options or {
type = "group",
args = {
general = {
name = L.cfg_settings,
type = "group",
args = {
minimap = {
order = 1,
name = L.cfg_minimap_icon,
type = "toggle",
width = "full",
set = function(info, value)
self.db.profile.minimap.hide = not value
if value then
self.icon:Show(addonName)
else
self.icon:Hide(addonName)
end
end,
get = function(info)
return not self.db.profile.minimap.hide
end,
},
replace_macros = {
order = 2,
name = L.cfg_replace_macros,
type = "toggle",
width = "full",
set = function(info, value)
self.db.profile.replace_macros = value
end,
get = function(info)
return self.db.profile.replace_macros
end,
},
},
},
profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db),
},
}
return self.options
end