CtrlNumPad
Description
CtrlNumPad is a VGUI element designed primarily for SpawnMenu and ControlPanel. It is used to create a DBinder with at least one DLabel. Each change made by the player in the CtrlNumPad acts on a previously defined ConVar.
To retrieve the panels associated with the vgui :
- To retrieve the DBinder created, you can use this variable associated with the panel : PANEL.NumPad1
- To retrieve the first DLabel created, you can use this variable associated with the panel : PANEL.Label1
- To retrieve the second DLabel created, you can use this variable associated with the panel : PANEL.Label2
By default, the DLabel:SetDark function is activated on both DLabels.
To retrieve the value of the CtrlNumPad you can use this function: Player:GetInfoNum
Parent
Derives methods, etc not listed on this page from CtrlNumPad.
Methods
CtrlNumPad:SetConVar1( string cvar )
The name of the convar that will store the key code for player selected key of the left key binder.
CtrlNumPad:SetConVar2( string cvar )
If set and label2 is set, the name of the convar that will store the key code for player selected key of the right key binder.
Example
Example of a spawnmenu use case
Output: 
