Garry's Mod Wiki

Panel:ConVarNumberThink

Panel:ConVarNumberThink

Panel:ConVarNumberThink()

Description

A think hook for Panels 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 Panel:ConVarStringThink.

Important: Make sure your Panel has a SetValue function, else you may get errors.

Example

How it should be implemented into your input.

function PANEL:Think() self:ConVarNumberThink() end
Output: Panel's value is changed when the convar changes.

Special Pages


Wikis

?

Render Time: 114ms

DB GetPage 47
Generate Html 1
SaveChanges (1) 56
Render Body 0
Render Sidebar 7