mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 10:26:02 +00:00
gui: add option to set cvars
This commit is contained in:
+7
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user