Repository navigation
Expand file tree
/
Copy pathConfig.lua
More file actions
57 lines (50 loc) · 1.83 KB
/
Copy pathConfig.lua
File metadata and controls
57 lines (50 loc) · 1.83 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
local DF = LibStub('AceAddon-3.0'):GetAddon('cDF')
local moduleOptions = {}
local options = {
type = 'group',
args = {
general = {
type = 'group',
inline = true,
name = 'General Options',
args = {
unlock = {
type = 'execute',
name = 'Do Nothing',
desc = 'Does nothing',
func = function()
DF:Print('Dont press me, i do nothing!')
end,
order = 69
}
}
}
}
}
function DF:SetupOptions()
self.optFrames = {}
LibStub('AceConfigRegistry-3.0'):RegisterOptionsTable('cDF', options)
self.optFrames['cDF'] =
LibStub('AceConfigDialog-3.0'):AddToBlizOptions('cDF', 'cDF')
local profiles = LibStub('AceDBOptions-3.0'):GetOptionsTable(self.db)
profiles.order = 666
LibStub('AceConfig-3.0'):RegisterOptionsTable('DragonflightUI_Profiles', profiles)
LibStub('AceConfigDialog-3.0'):AddToBlizOptions('DragonflightUI_Profiles', 'Profiles', 'cDF')
end
function DF:RegisterModuleOptions(name, options)
--self:Print('RegisterModuleOptions()', name, options)
moduleOptions[name] = options
-- function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
LibStub('AceConfigRegistry-3.0'):RegisterOptionsTable('cDF' .. name, options)
self.optFrames[name] =
LibStub('AceConfigDialog-3.0'):AddToBlizOptions('cDF' .. name, name, 'cDF')
end
function DF:RegisterSlashCommands()
self:RegisterChatCommand('df', 'SlashCommand')
self:RegisterChatCommand('dragonflight', 'SlashCommand')
end
function DF:SlashCommand(msg)
--self:Print('Slash: ' .. msg)
InterfaceOptionsFrame_OpenToCategory('cDF')
InterfaceOptionsFrame_OpenToCategory('cDF')
end