Revision Difference
Panel:ConVarNumberThink#561644
<function name="ConVarNumberThink" parent="Panel" type="classfunc">
<description>
A think hook for <page>Panel</page>s using ConVars as a value. Call it in the Think hook. Sets the panel's value should the convar change.
This function is best for: checkboxes, sliders, number wangs
For a string alternative, see <page>Panel:ConVarStringThink</page>.
<note>Make sure your Panel has a SetValue function, else you may get errors.</note>
</description>
<file line="106-L119">lua/derma/init.lua</file>⤶
<realm>Client and Menu</realm>
</function>
<example>
<description>How it should be implemented into your input.</description>
<code>
function PANEL:Think()
self:ConVarNumberThink()
end
</code>
<output>Panel's value is changed when the convar changes.</output>
</example>