DMenu/AddCVar

From Garry's Mod
Revision as of 16:04, 17 August 2018 by Robotboy655 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 DMenu:AddCVar( )

Contents

DescriptionPanelFunc

Creates a DMenuOptionCVar and adds it as an option into the menu. Checking and unchecking the option will alter the given console variable's value.

Arguments

string strText

The text of the button

Arguments

string convar

The console variable to change

Arguments

string on

The value of the console variable to set when the option is checked

Arguments

string off

The value of the console variable to set when the option is unchecked

Arguments

function funcFunction=nil

If set, the function will be called every time the option is pressed/clicked/selected.

It will have only one argument:

Panel pnl - The created DMenuOptionCVar.

Returns

Panel

The created DMenuOptionCVar
Personal tools
Navigation