DImage.SetImageColor

From GMod Wiki

Jump to: navigation, search
Function
Syntax DImage:SetImageColor( Color colour )
Description:
Changes the color of the image.
Returns: nil
In Object: DImage
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DImage.SetImageColor]DImage.SetImageColor [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreate an image of an antlion.
Used onNewerClient.png
Code
// myParent = a panel
myImage = vgui.Create("DImage", myParent)
myImage:SetImage( "VGUI/entities/npc_antlion" )
myImage:SetImageColor( Color(255,0,0,255) ) // make it red.
myImage:SizeToContents() // make the control the same size as the image. 
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox