-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathGeneralSection.lua
More file actions
45 lines (43 loc) · 1.69 KB
/
GeneralSection.lua
File metadata and controls
45 lines (43 loc) · 1.69 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
---@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:LoadGeneralSection()
return {
type = "group",
order = 1.5,
inline = false,
width = 2,
name = function() return STAT_CATEGORY_GENERAL end,
args = {
showGeneralStats = {
type = "toggle",
order = 0,
name = function() return i18n("Show General Stats") end,
desc = function() return i18n("Shows/Hides all general stats.") end,
width = 1.5,
get = function () return ExtendedCharacterStats.profile.general.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.general.display = value
Stats.RebuildStatInfos()
end,
},
movementSpeed = {
type = "toggle",
order = 1,
name = function() return i18n("Show Movement Speed") end,
desc = function() return i18n("Shows/Hides the movement speed value.") end,
width = 1.5,
disabled = function() return (not ExtendedCharacterStats.profile.general.display); end,
get = function () return ExtendedCharacterStats.profile.general.movementSpeed.display; end,
set = function (_, value)
ExtendedCharacterStats.profile.general.movementSpeed.display = value
Stats.RebuildStatInfos()
end,
},
},
}
end