-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathSpellSchoolsSection.lua
More file actions
113 lines (110 loc) · 4.98 KB
/
SpellSchoolsSection.lua
File metadata and controls
113 lines (110 loc) · 4.98 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
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
local ECSLoader = ECSLoader
---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
---@type Stats
local Stats = ECSLoader:ImportModule("Stats")
---@type i18n
local i18n = ECSLoader:ImportModule("i18n")
function _Config:SpellSchoolsSection()
return {
type = "group",
order = 6,
inline = false,
width = 2,
name = function() return i18n("Spell Schools") end,
args = {
arcane = {
type = "toggle",
order = 1,
name = function() return i18n("Arcane") end,
desc = function() return i18n("Shows/Hides all arcane values.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.arcane.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.spell.arcane.display = value
Stats.RebuildStatInfos()
end,
},
fire = {
type = "toggle",
order = 2,
name = function() return i18n("Fire") end,
desc = function() return i18n("Shows/Hides all fire values.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.fire.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.spell.fire.display = value
Stats.RebuildStatInfos()
end,
},
frost = {
type = "toggle",
order = 3,
name = function() return i18n("Frost") end,
desc = function() return i18n("Shows/Hides all frost values.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.frost.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.spell.frost.display = value
Stats.RebuildStatInfos()
end,
},
holy = {
type = "toggle",
order = 4,
name = function() return i18n("Holy") end,
desc = function() return i18n("Shows/Hides all holy values.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.holy.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.spell.holy.display = value
Stats.RebuildStatInfos()
end,
},
nature = {
type = "toggle",
order = 5,
name = function() return i18n("Nature") end,
desc = function() return i18n("Shows/Hides all nature values.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.nature.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.spell.nature.display = value
Stats.RebuildStatInfos()
end,
},
physical = {
type = "toggle",
order = 6,
name = function() return i18n("Physical") end,
desc = function() return i18n("Shows/Hides all physical values.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.physical.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.spell.physical.display = value
Stats.RebuildStatInfos()
end,
},
shadow = {
type = "toggle",
order = 7,
name = function() return i18n("Shadow") end,
desc = function() return i18n("Shows/Hides all shadow values.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.shadow.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.spell.shadow.display = value
Stats.RebuildStatInfos()
end,
},
},
}
end