We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea65827 commit 7cf9722Copy full SHA for 7cf9722
1 file changed
plugins/lua/spectate.lua
@@ -84,8 +84,18 @@ local function load_state()
84
function() config_file:write() end
85
end
86
87
--- global variables to make the UI script simpler
88
-_ENV.config, _ENV.save_state = load_state()
+local config, save_state = load_state()
+
89
+-- called by gui/spectate
90
+function get_config_elem(name, key)
91
+ local elem = config[name]
92
+ if not elem then return end
93
+ if type(elem) == 'table' then
94
+ return elem[key]
95
+ end
96
+ return elem
97
+end
98
99
100
function refresh_cpp_config()
101
for name,value in pairs(config) do
0 commit comments