Category:DBinder

From Garry's Mod
Jump to: navigation, search

Contents

DescriptionPanelPage

Input which can bind a command to a key. Used for binding inputs and outputs of TOOLs.

Inherited Functions

Inherits the following functions from DButton and its parents up to 3 levels deep:


Examples

Example

Creates a DBinder that prints to the player's chat when a new key is bound.

local frame = vgui.Create("DFrame")
frame:SetSize(250,100)
frame:Center()
frame:SetTitle("DBinder Example")
frame:MakePopup()

local binder = vgui.Create( "DBinder", frame )
binder:SetSize( 200, 50 )
binder:SetPos( 25, 35 )

function binder:OnChange( num )
	LocalPlayer():ChatPrint("New bound key: "..input.GetKeyName( num ))
end

Output:

DBinder.png

Pages in category "DBinder"

The following 6 pages are in this category, out of 6 total.

Personal tools
Navigation