DRGBBar.OnColorChange

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameOnColorChange
SyntaxPANEL:OnColorChange( )
DescriptionCalled when the color changes.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=DRGBBar.OnColorChange]DRGBBar.OnColorChange [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrint color when the color changes.
Used onNewerClient.png
Code
 
DRGBBar.OnColorChange = function()
 
     color = HSVToColor(DRGBBar:GetHue(), 1, 1)
     print("R= "..color.r .." G= ".. color.g ..  " B= ".. color.b )
 
end
 
OutputReturns color in the console when the color changes.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox