DBinder
Description
Input which can bind a command to a key. Used for binding inputs and outputs of TOOLs.
Parent
Derives methods, etc not listed on this page from DButton.
Events
Methods
number DBinder:GetSelectedNumber()
Gets the code of the key currently bound by the DBinder. Same as DBinder:GetValue. An AccessorFunc
Gets the code of the key currently bound by the DBinder. Same as DBinder:GetSelectedNumber.
DBinder:SetSelectedNumber( number keyCode )
Sets the current key bound by the DBinder, and updates the button's text as well as the ConVar.
DBinder:UpdateText()
This is used internally - although you're able to use it you probably shouldn't.
Used to set the text of the DBinder to the current key binding, or NONE.
Example
Creates a DBinder that prints to the player's chat when a new key is bound.