Skip to content

Commit

Permalink
add settings to toggle options
Browse files Browse the repository at this point in the history
  • Loading branch information
Jodsderechte committed Jul 21, 2024
1 parent 00a70f8 commit bd20873
Show file tree
Hide file tree
Showing 3 changed files with 327 additions and 0 deletions.
174 changes: 174 additions & 0 deletions Data/SpecList.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
local _, GFIO = ...
--- speclist with icons and orders
GFIO.SpecList = {
tank = {
[66] = { -- prot pala
icon = 236264,
order = 1
},
[73] = { -- prot war
icon = 132341,
order = 2
},
[104] = {
icon = 132276, -- guardian
order = 3
},
[250] = {
icon =135770, -- blood
order = 4
},
[268] = {
icon =608951, -- brewmaster
order = 5
},
[581] = {
icon =1247265, -- vengeance
order = 6
},
},
healer = {
[65] = {
icon =135920, -- holy pala
order = 9
},
[105] = {
icon =136041, -- resto druid
order = 10
},
[256] = {
icon =135940, -- disc
order = 11
},
[257] = {
icon =237542, -- holy
order = 12
},
[264] = {
icon =136052, -- restoration shaman
order = 13
},
[270] = {
icon =608952, -- mistweaver
order = 14
},
[1468] = {
icon =4511812, -- preservation
order = 15
},
},
meleedps = {
[70] = {
icon =135873, -- ret
order = 1
},
[71] = {
icon =132355, -- arms
order = 2
},
[72] = {
icon =132347, -- fury
order = 3
},
[103] = {
icon =132115, -- feral
order = 4
},
[251] = {
icon =135773, -- frost dk
order = 5
},
[252] = {
icon =135775, -- unholy dk
order = 6
},
[259] = {
icon =236270, -- assa
order = 7
},
[260] = {
icon =236286, -- outlaw
order = 8
},
[261] = {
icon =132320, -- sub
order = 9
},
[263] = {
icon =237581, -- enhancement
order = 10
},
[269] = {
icon =608953, -- windwalker
order = 11
},
[577] = {
icon =1247264, -- havoc
order = 12
},
[255] = {
icon =461113, -- survival
order = 13
},
},
rangedps = {
[62] = {
icon =135932, -- arcane
order = 16
},
[63] = {
icon =135810, -- fire
order = 17
},
[64] = {
icon =135846, -- frost mage
order = 18
},
[102] = {
icon =136096, -- balance
order = 19
},
[253] = {
icon =461112, -- bm
order = 20
},
[254] = {
icon =236179, -- mm
order = 21
},
[258] = {
icon =136207, -- shadow
order = 22
},
[262] = {
icon =136048, -- elemental
order = 23
},
[265] = {
icon =136145, -- affliction
order = 24
},
[266] = {
icon =136172, -- demonology
order = 25
},
[267] = {
icon =136186, -- destruction
order = 26
},
[1467] = {
icon =4511811, -- devestation
order = 27
},
[1473] = {
icon =5198700, -- augmentation
order = 28
},
},






}
54 changes: 54 additions & 0 deletions Options/OptionDefaults.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
local _, GFIO = ...

GFIO.OptionDefaults = {
profile = {
useMainScore = true,
showNote = true,
showKeyLevel = true,
addScoreToGroup = true,
sortApplicants = true,
sortGroupsByScore = true,
sortAscending = false,
spec = {
[62] = true, -- arcane
[63] = true, -- fire
[64] = true, -- frost mage
[65] = true, -- holy pala
[66] = true, -- prot pala
[70] = true, -- ret
[71] = true, -- arms
[72] = true, -- fury
[73] = true, -- prot war
[102] = true, -- balance
[103] = true, -- feral
[104] = true, -- guardian
[105] = true, -- resto druid
[250] = true, -- blood
[251] = true, -- frost dk
[252] = true, -- unholy dk
[255] = true, -- survival
[253] = true, -- bm
[254] = true, -- mm
[256] = true, -- disc
[257] = true, -- holy
[258] = true, -- shadow
[259] = true, -- assa
[260] = true, -- outlaw
[261] = true, -- sub
[262] = true, -- elemental
[263] = true, -- enhancement
[264] = true, -- restoration shaman
[265] = true, -- affliction
[266] = true, -- demonology
[267] = true, -- destruction
[269] = true, -- windwalker
[270] = true, -- mistweaver
[268] = true, -- brewmaster
[577] = true, -- havoc
[581] = true, -- vengeance
[1467] = true, -- devestation
[1468] = true, -- preservation
[1473] = true, -- augmentation
}
}
}
99 changes: 99 additions & 0 deletions Options/Options.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
local appName, GFIO = ...
local SharedMedia = LibStub("LibSharedMedia-3.0")
---@type AceConfigOptionsTable
GFIO.options = {
name = GFIO.getLocalisation("addonOptions"),
type = "group",
args = {
sortAscending = {
name = GFIO.getLocalisation("sortAscending"),
desc = GFIO.getLocalisation("sortAscendingDescription"),
order = 30,
width = "full",
type = "toggle",
set = function(info,val) GFIO.db.profile.sortAscending = val end, --Sets value of SavedVariables depending on toggles
get = function(info)
return GFIO.db.profile.sortAscending --Sets value of toggles depending on SavedVariables
end,
},
useMainScore = {
name = GFIO.getLocalisation("useMainScore"),
desc = GFIO.getLocalisation("useMainScoreDescription"),
order = 30,
width = "full",
type = "toggle",
set = function(info,val) GFIO.db.profile.useMainScore = val end, --Sets value of SavedVariables depending on toggles
get = function(info)
return GFIO.db.profile.useMainScore --Sets value of toggles depending on SavedVariables
end,
},
applicantView = {
name = GFIO.getLocalisation("applicantView"),
type = "group",
args = {
showNote = {
name = GFIO.getLocalisation("showNote"),
desc = GFIO.getLocalisation("showNoteDescription"),
order = 30,
width = "full",
type = "toggle",
set = function(info,val) GFIO.db.profile.showNote = val end, --Sets value of SavedVariables depending on toggles
get = function(info)
return GFIO.db.profile.showNote --Sets value of toggles depending on SavedVariables
end,
},
showKeyLevel = {
name = GFIO.getLocalisation("showKeyLevel"),
desc = GFIO.getLocalisation("showKeyLevelDescription"),
order = 30,
width = "full",
type = "toggle",
set = function(info,val) GFIO.db.profile.showKeyLevel = val end, --Sets value of SavedVariables depending on toggles
get = function(info)
return GFIO.db.profile.showKeyLevel --Sets value of toggles depending on SavedVariables
end,
},
sortApplicants = {
name = GFIO.getLocalisation("sortApplicants"),
desc = GFIO.getLocalisation("sortApplicantsDescription"),
order = 30,
width = "full",
type = "toggle",
set = function(info,val) GFIO.db.profile.sortApplicants = val end, --Sets value of SavedVariables depending on toggles
get = function(info)
return GFIO.db.profile.sortApplicants --Sets value of toggles depending on SavedVariables
end,
},

}
},
groupView = {
name = GFIO.getLocalisation("groupView"),
type = "group",
args = {
addScoreToGroup = {
name = GFIO.getLocalisation("addScoreToGroup"),
desc = GFIO.getLocalisation("addScoreToGroupDescription"),
order = 30,
width = "full",
type = "toggle",
set = function(info,val) GFIO.db.profile.addScoreToGroup = val end, --Sets value of SavedVariables depending on toggles
get = function(info)
return GFIO.db.profile.addScoreToGroup --Sets value of toggles depending on SavedVariables
end,
},
sortGroupsByScore = {
name = GFIO.getLocalisation("sortGroupsByScore"),
desc = GFIO.getLocalisation("sortGroupsByScoreDescription"),
order = 30,
width = "full",
type = "toggle",
set = function(info,val) GFIO.db.profile.sortGroupsByScore = val end, --Sets value of SavedVariables depending on toggles
get = function(info)
return GFIO.db.profile.sortGroupsByScore --Sets value of toggles depending on SavedVariables
end,
},
}
}
}
}

0 comments on commit bd20873

Please sign in to comment.