Garry's Mod Wiki

Garry's Mod Wiki

  Panel:ConVarStringThink()

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: text inputs, read-only inputs, dropdown selects

For a number alternative, see Panel:ConVarNumberThink.

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:ConVarStringThink() end
Output: Panel's value is changed when the convar changes.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...