Garry's Mod Wiki

ContextBase

Description

A base for all context menu panels ( The ones used for tool options in sandbox )

View source

Parent

Derives methods, etc not listed on this page from Panel.

Methods

ContextBase:ControlValues( table contextData )
Called by spawnmenu functions (when creating a context menu) to fill this control with data.
string ContextBase:ConVar()
Returns the ConVar for the panel to change/handle, set by ContextBase:SetConVar
ContextBase:SetConVar( string cvar )
Sets the ConVar for the panel to change/handle.
ContextBase:TestForChanges()
You should override this function and use it to check whether your convar value changed.