added (un)checkAll button in DR-Categories in Diminishing Module

This commit is contained in:
Sumsebrum 2021-07-29 17:23:09 +02:00
parent 8a17592842
commit 5da6d1d7c9
2 changed files with 25 additions and 2 deletions

View File

@ -702,7 +702,7 @@ end
function Auras:GetInterruptOptions()
local options = {
ckeckAll = {
checkAll = {
order = 1,
width = "0.7",
name = L["Check All"],

View File

@ -610,7 +610,30 @@ function Diminishings:GetOptions()
end
function Diminishings:CategoryOptions()
local categories = {}
local categories = {
checkAll = {
order = 1,
width = "0.7",
name = L["Check All"],
type = "execute",
func = function()
for k,_ in pairs(defaultCategories()) do
Gladdy.db.drCategories[k].enabled = true
end
end,
},
uncheckAll = {
order = 2,
width = "0.7",
name = L["Uncheck All"],
type = "execute",
func = function()
for k,_ in pairs(defaultCategories()) do
Gladdy.db.drCategories[k].enabled = false
end
end,
},
}
local indexList = {}
for k,_ in pairs(DRData:GetCategories()) do
tinsert(indexList, k)