Garry's Mod Wiki

Garry's Mod Wiki

  DColorPalette:OnValueChanged( table newcol )

Description

Called when the color is changed after clicking a new value. For Override

Arguments

1 table newcol
The new color of the DColorPalette

Example

Creates a DFrame with a color palette that prints values after being changed.

local frame = vgui.Create( "DFrame" ) frame:SetSize( ScrW() - 100, ScrH() - 100 ) frame:Center() frame:MakePopup() local palette = vgui.Create( "DColorPalette", frame ) palette:Dock( FILL ) function palette:OnValueChanged( newcol ) PrintTable( newcol ) end
Output: The color chosen on the palette.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...