Derma_Install_Convar_Functions
Example
Adds the functions to a panel (snippet of vgui/dcheckbox.lua)
local PANEL = {}
Derma_Install_Convar_Functions( PANEL )
function PANEL:Init()
-- Init function here
end
function PANEL:Think()
self:ConVarStringThink()
end
Output: The
PANEL
table now contains the functions SetConVar
, ConVarChanged
, ConVarStringThink
and ConVarNumberThink
(and an Init
function and a Think
function)