Category:DColorButton

From Garry's Mod
Jump to: navigation, search

Contents

DescriptionPanelPage

Colorful buttons. Used internally by DColorPalette.

Inherited Functions

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


Examples

Example

Creates a DColorButton buton.

local frame = vgui.Create( "DFrame" )
frame:SetSize( 500, 500 )
frame:Center()
frame:MakePopup()

local DColorButton = vgui.Create( "DColorButton", frame )
DColorButton:SetPos( 1, 28 )
DColorButton:SetSize( 100, 30 )
DColorButton:Paint( 100, 30 )
DColorButton:SetText( "DColorButton" )
DColorButton:SetColor( Color( 0, 110, 160 ) )
function DColorButton:DoClick() -- Callback inherited from DLabel, which is DColorButton's base
	print( "I am clicked! My color is ", self:GetColor() )
end


Pages in category "DColorButton"

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

Personal tools
Navigation