-
Notifications
You must be signed in to change notification settings - Fork 0
/
CheckFearWard3Options.lua
237 lines (235 loc) · 8.17 KB
/
CheckFearWard3Options.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
--[[
File Author: @file-author@
File Revision: @file-abbreviated-hash@
File Date: @file-date-iso@
]]--
local CheckFearWard3 = CheckFearWard3 or LibStub("AceAddon-3.0"):GetAddon("CheckFearWard3")
local L = LibStub("AceLocale-3.0"):GetLocale("CheckFearWard3")
local CFW3 = CheckFearWard3
local sub = string.sub
options = {
name = CFW3.name,
desc = L["DESC"],
handler = CheckFearWard3,
type='group',
args = {
generalGroup = {
type = "group",
name = CFW3.name,
childGroups = 'tab',
args = {
mainHeader = {
type = "description",
name = " " .. L["Addon"] .. "\n " .. CFW3.version .. "\n " .. sub(CFW3.date,6,7) .. "-" .. sub(CFW3.date,9,10) .. "-" .. sub(CFW3.date,1,4),
order = 1,
image = "Interface\\Icons\\spell_holy_excorcism",
imageWidth = 32, imageHeight = 32,
},
turnOn = {
type = 'toggle',
order = 1,
width = "full",
name = L["TurnOn"],
desc = L["TurnOnDesc"],
get = function() return CFW3.db.profile.turnOn end,
set = function()
if (CFW3.db.profile.turnOn == false) then
print("|cFF33FF99CheckFearWard3|r: " .. CheckFearWard3.version .. " |cff00ff00Enabled|r")
CFW3.db.profile.turnOn = not CFW3.db.profile.turnOn
else
print("|cFF33FF99CheckFearWard3|r: " .. CheckFearWard3.version .. " |cffff8080Disabled|r")
CFW3.db.profile.turnOn = not CFW3.db.profile.turnOn
end
end,
},
debug = {
type = 'toggle',
order = 2,
width = "full",
name = L["debug"],
desc = L["debugD"],
get = function() return CFW3.db.profile.debug end,
set = function()
CFW3.db.profile.debug = not CFW3.db.profile.debug
end,
hidden = function() return CFW3.db.profile.debug end,
},
statusNotification = {
type = 'group',
order = 1,
disabled = function() return not CFW3.db.profile.turnOn end,
name = L["SN"],
desc = L["SND"],
args = {
broadcast = {
type = 'group',
name = L["BRODG"],
desc = L["BRODD"],
args = {
broadcast = {
type = 'toggle',
order = 1,
width = "full",
name = L["BROD"],
desc = L["BRODD"],
get = function() return CFW3.db.profile.brd end,
set = function()
CFW3.db.profile.brd = not CFW3.db.profile.brd
end,
},
chat = {
type = 'toggle',
order = 2,
width = "full",
disabled = function() return not CFW3.db.profile.brd end,
name = L["BS"],
desc = L["BSD"],
get = function() return CFW3.db.profile.bs end,
set = function()
CFW3.db.profile.bs = not CFW3.db.profile.bs
end,
},
party = {
type = 'toggle',
order = 3,
width = "full",
disabled = function() return not CFW3.db.profile.brd end,
name = L["BP"],
desc = L["BPD"],
get = function() return CFW3.db.profile.bp end,
set = function()
CFW3.db.profile.bp = not CFW3.db.profile.bp
end,
},
raid = {
type = 'toggle',
order = 4,
width = "full",
disabled = function() return not CFW3.db.profile.brd end,
name = L["BR"],
desc = L["BRD"],
get = function() return CFW3.db.profile.br end,
set = function()
CFW3.db.profile.br = not CFW3.db.profile.br
end,
},
},
},
dcf = {
type = 'toggle',
order = 1,
width = "full",
name = L["DCF"],
desc = L["DCFD"],
get = function() return CFW3.db.profile.dcf end,
set = function()
CFW3.db.profile.dcf = not CFW3.db.profile.dcf
end,
},
ctra = {
type = 'toggle',
order = 2,
width = "full",
name = L["CTRA"],
desc = L["CTRAD"],
get = function() return CFW3.db.profile.ctra end,
set = function()
CFW3.db.profile.ctra = not CFW3.db.profile.ctra
end,
},
audible = {
type = 'toggle',
order = 3,
width = "full",
name = L["AUD"],
desc = L["AUDD"],
get = function() return CFW3.db.profile.audible end,
set = function()
CFW3.db.profile.audible = not CFW3.db.profile.audible
end,
},
},
},
LDBOptions = {
type = 'group',
order = 2,
disabled = function()
if (LibStub:GetLibrary("LibDataBroker-1.1", true)) then
return false
else
return true
end
end,
name = L["LDB Options"],
args = {
MinimapIcon = {
type = "toggle",
order = 1,
width = "full",
name = L["Show minimap button"],
desc = L["Show the CFW3 minimap button"],
get = function(info) return not CFW3.db.profile.MinimapIcon.hide end,
set = function(info, value)
local LDBIcon = LibStub("LibDBIcon-1.0")
CFW3.db.profile.MinimapIcon.hide = not value
if value then LDBIcon:Show("CheckFearWard3") else LDBIcon:Hide("CheckFearWard3") end
end,
disabled = function()
if (LibStub:GetLibrary("LibDBIcon-1.0", true)) then
return false
else
return true
end
end,
},
showHighTime = {
type = 'toggle',
order = 2,
name = L["SHT"],
desc = L["SHTD"],
get = function() return CFW3.db.profile.showHighTime end,
set = function()
CFW3.db.profile.showHighTime = not CFW3.db.profile.showHighTime
end,
},
showLowTime = {
type = 'toggle',
order = 3,
width = "double",
name = L["SLT"],
desc = L["SLTD"],
get = function() return CFW3.db.profile.showLowTime end,
set = function()
CFW3.db.profile.showLowTime = not CFW3.db.profile.showLowTime
end,
},
HeaderFont = {
type = 'range',
order = 4,
width = "double",
min = 10,
max = 24,
step = 1.00,
name = L["LDB Header Font Size"],
desc = L["LDB Header Font Size"],
get = function(info) return CFW3.db.profile.HeaderFont or 14 end,
set = function(info,v) CFW3.db.profile.HeaderFont = v end,
},
ContentFont = {
type = 'range',
order = 5,
width = "double",
min = 10,
max = 24,
step = 1.00,
name = L["LDB Content Font Size"],
desc = L["LDB Content Font Size"],
get = function(info) return CFW3.db.profile.ContentFont or 12 end,
set = function(info,v) CFW3.db.profile.ContentFont = v end,
},
},
},
},
},
},
}