Repository navigation
Expand file tree
/
Copy pathConfig.lua
More file actions
99 lines (80 loc) · 1.8 KB
/
Copy pathConfig.lua
File metadata and controls
99 lines (80 loc) · 1.8 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
local _, L = ...
L.TEXT_TIME_PADDING = 0.5 -- static padding, feels more natural with a pause to breathe. Moved from Text.lua so that it can be used in the calculations for the mouseover description of Text speed option
function L.GetListString(...)
local ret = ''
local strings = {...}
local num = #strings
for i, str in pairs(strings) do
ret = ret .. '• ' .. str .. (i == num and '' or '\n')
end
return ret
end
function L.ValidateKey(key)
return ( key and ( not key:lower():match('button') ) ) and key
end
function L.ValidatePadKey(key)
return ( key and key:match('^PAD') ) and key
end
function L.GetDefaultConfig()
local t = {}
for k, v in pairs(L.defaults) do
t[k] = v
end
return t
end
function L.Get(key)
if L.cfg and L.cfg[key] ~= nil then
return L.cfg[key]
else
return L.defaults[key]
end
end
function L.Set(key, val)
L.cfg = L.cfg or {}
L.cfg[key] = val
end
setmetatable(L, {
__call = function(self, input, newValue)
return L.Get(input) or self[input]
end,
})
----------------------------------
-- Default config
----------------------------------
L.defaults = {
----------------------------------
scale = 1,
strata = 'MEDIUM',
hideui = false,
-- theme = 'DEFAULT',
titlescale = 1,
titleoffset = 500,
titleoffsetY = 0,
elementscale = 1,
boxscale = 1,
boxoffsetX = 0,
boxoffsetY = 150,
boxlock = true,
boxpoint = 'Bottom',
disableprogression = false,
flipshortcuts = false,
delaydivisor = 15,
anidivisor = 5,
ttsenabled = false,
ttsrate = 0,
ttsvolume = 100,
ttsvoice = 1,
ttsmalevoice = 1,
ttsfemalevoice = 1,
inspect = 'SHIFT',
accept = 'SPACE',
reset = 'BACKSPACE',
padaccept = 'PAD1',
padinspect = 'PAD4',
padnext = 'PAD3',
padgoodbye = 'PAD2',
padup = 'PADDUP',
paddown = 'PADDDOWN',
padleft = 'PADDLEFT',
padright = 'PADDRIGHT',
}