Category:Button

From Garry's Mod
Jump to: navigation, search

Contents

DescriptionPanelPage

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

Only exists for backwards compatibility with Panel:SetActionFunction. Use DButton instead.
Creates a button that players can click on.

Inherited Functions

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


Examples

Example

Creates a button with the text "Click Me" that when pressed prints "Hello World!" in the console.

local button = vgui.Create( "Button" )
button:SetSize( 150, 30 )
button:Center()
button:SetVisible( true )
button:SetText( "Click Me" )
function button:OnMousePressed()
	print( "Hello World!" )
end


Pages in category "Button"

This category contains only the following page.

Personal tools
Navigation