DLabel/SetColor

From Garry's Mod
Jump to: navigation, search
 DLabel:SetColor( )

Contents

DescriptionPanelFunc

Changes color of label. Alias of DLabel:SetTextColor.

Arguments

table color

The color to set. Uses the Color structure.

Examples

Example

Creates a label and changes it color to red.

local DLabel = vgui.Create( "DLabel" )
DLabel:SetPos( 90, 50 )
DLabel:SetColor(Color(255, 0, 0))
DLabel:SetText( "Hello world." )
DLabel:SizeToContents()


Personal tools
Navigation