gui: add option to set cvars

This commit is contained in:
shagu
2018-03-04 23:21:44 +01:00
parent 1466b5aa74
commit d1fe3940d4
+7 -2
View File
@@ -51,8 +51,13 @@ pfUI:RegisterModule("gui", function ()
frame.caption:SetText(caption)
end
frame.configCategory = category
frame.configEntry = config
if category == "CVAR" then
category = {}
category[config] = tostring(GetCVar(config))
ufunc = function()
SetCVar(this:GetParent().config, this:GetParent().category[config])
end
end
frame.category = category
frame.config = config