DColorMixer
Description
A standard Derma color mixer
Parent
Derives methods, etc not listed on this page from DPanel.
Events
DColorMixer:ValueChanged( table col )
Called when the player changes the color of the DColorMixer.
The returned color will not have the color metatable.
Methods
DColorMixer:ConVarThink()
This is used internally - although you're able to use it you probably shouldn't.
DColorMixer:DoConVarThink( string cvar )
This is used internally - although you're able to use it you probably shouldn't.
string DColorMixer:GetConVarA()
Returns the ConVar name for the alpha channel of the color.
See also:
DColorMixer:GetConVarR - For the red channel
DColorMixer:GetConVarG - For the green channel
DColorMixer:GetConVarB - For the blue channel
string DColorMixer:GetConVarB()
Returns the ConVar name for the blue channel of the color.
See also:
DColorMixer:GetConVarR - For the red channel
DColorMixer:GetConVarG - For the green channel
DColorMixer:GetConVarA - For the alpha channel
string DColorMixer:GetConVarG()
Returns the ConVar name for the green channel of the color.
See also:
DColorMixer:GetConVarR - For the red channel
DColorMixer:GetConVarB - For the blue channel
DColorMixer:GetConVarA - For the alpha channel
string DColorMixer:GetConVarR()
Returns the ConVar name for the red channel of the color.
See also:
DColorMixer:GetConVarG - For the green channel
DColorMixer:GetConVarB - For the blue channel
DColorMixer:GetConVarA - For the alpha channel
DColorMixer:SetBaseColor( table clr )
Sets the base color of the DColorCube part of the DColorMixer.
See also DColorCube:SetBaseRGB
DColorMixer:SetConVarA( string convar )
Sets the ConVar name for the alpha channel of the color.
See also:
DColorMixer:SetConVarR - For the red channel
DColorMixer:SetConVarG - For the green channel
DColorMixer:SetConVarB - For the blue channel
DColorMixer:SetConVarB( string convar )
Sets the ConVar name for the blue channel of the color.
See also:
DColorMixer:SetConVarR - For the red channel
DColorMixer:SetConVarG - For the green channel
DColorMixer:SetConVarA - For the alpha channel
DColorMixer:SetConVarG( string convar )
Sets the ConVar name for the green channel of the color.
See also:
DColorMixer:SetConVarR - For the red channel
DColorMixer:SetConVarB - For the blue channel
DColorMixer:SetConVarA - For the alpha channel
DColorMixer:SetConVarR( string convar )
Sets the ConVar name for the red channel of the color.
See also:
DColorMixer:SetConVarG - For the green channel
DColorMixer:SetConVarB - For the blue channel
DColorMixer:SetConVarA - For the alpha channel
DColorMixer:SetVector( Vector vec )
Sets the color of DColorMixer from a Vector. Alpha is not included.
DColorMixer:TranslateValues()
This is used internally - although you're able to use it you probably shouldn't.We advise against using this. It may be changed or removed in a future update.
Does nothing.
DColorMixer:UpdateColor( table clr )
This is used internally - although you're able to use it you probably shouldn't.
Use DColorMixer:SetColor instead!
DColorMixer:UpdateConVar( string cvar, string part, table clr )
This is used internally - although you're able to use it you probably shouldn't.
DColorMixer:UpdateConVars( table clr )
This is used internally - although you're able to use it you probably shouldn't.
Example
Creates a DColorMixer in a DFrame, as seen above
local Frame = vgui.Create("DFrame")
Frame:SetSize(267,186) -- Good size for example
Frame:Center()
Frame:MakePopup()
local Mixer = vgui.Create("DColorMixer", Frame)
Mixer:Dock(FILL) -- Make Mixer fill place of Frame
Mixer:SetPalette(true) -- Show/hide the palette DEF:true
Mixer:SetAlphaBar(true) -- Show/hide the alpha bar DEF:true
Mixer:SetWangs(true) -- Show/hide the R G B A indicators DEF:true
Mixer:SetColor(Color(30,100,160)) -- Set the default color