-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathConfig.lua
71 lines (57 loc) · 1.38 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
local _, addonTable = ...
local StdUi = LibStub('StdUi')
--- @type MaxDps
if not MaxDps then return end
local MaxDps = MaxDps
local Rogue = addonTable.Rogue
local defaultOptions = {
outlawMarkedAsCooldown = false,
}
function Rogue:GetConfig()
local config = {
layoutConfig = { padding = { top = 30 } },
database = self.db,
rows = {
[1] = {
outlaw = {
type = 'header',
label = 'Outlaw options'
}
},
[2] = {
outlawMarkedAsCooldown = {
type = 'checkbox',
label = 'Marked for Death as cooldown',
column = 12
},
},
},
}
return config
end
function Rogue:InitializeDatabase()
if self.db then return end
if not MaxDpsRogueOptions then
MaxDpsRogueOptions = defaultOptions
end
self.db = MaxDpsRogueOptions
end
function Rogue:CreateConfig()
if self.optionsFrame then
return
end
local optionsFrame = StdUi:PanelWithTitle(nil, 100, 100, 'Rogue Options')
self.optionsFrame = optionsFrame
optionsFrame:Hide()
optionsFrame.name = 'Rogue'
optionsFrame.parent = 'MaxDps'
StdUi:BuildWindow(self.optionsFrame, self:GetConfig())
StdUi:EasyLayout(optionsFrame, { padding = { top = 40 } })
optionsFrame:SetScript('OnShow', function(of)
of:DoLayout()
end)
--InterfaceOptions_AddCategory(optionsFrame)
--InterfaceCategoryList_Update()
--InterfaceOptionsOptionsFrame_RefreshCategories()
--InterfaceAddOnsList_Update()
end