Garry's Mod Wiki

DColorCombo

Description

The DColorCombo allows the user to choose color, without alpha, using DColorMixer or DColorPalette in a tabbed view.

Parent

Derives from DPropertySheet.

Methods

DColorCombo:BuildControls()
This is used internally - although you're able to use it you probably shouldn't. Called internally to create panels necessary for this panel to work.
table DColorCombo:GetColor()
Returns the color of the DColorCombo.
boolean DColorCombo:IsEditing()
Returns true if the panel is currently being edited More of a internal method, it technically should only ever work (i.e. return true) inside DColorCombo:OnValueChanged.
DColorCombo:OnValueChanged( table newcol )
Called when the value (color) of this panel was changed.
DColorCombo:SetColor( table clr )
Sets the color of this panel.

Example

Creates a DColorCombo and sets its initial value.

local frame = vgui.Create( "DFrame" ) frame:SetSize( 500, 300 ) frame:Center() frame:MakePopup() local DermaColorCombo = vgui.Create( "DColorCombo", frame ) DermaColorCombo:SetPos( 5, 30 ) DermaColorCombo:SetColor( Color( 255, 255, 255 ) ) local DColorButton = frame:Add( "DColorButton" ) DColorButton:SetPos( 300, 50 ) DColorButton:SetSize( 64, 64 ) function DermaColorCombo:OnValueChanged( col ) DColorButton:SetColor( col ) end

Page Links


Special Pages


Wikis

?

Render Time: 65ms

DB GetPage 35
Generate Html 5
SaveChanges (1) 16
Render Body 0
Render Sidebar 6