Garry's Mod Wiki

DImage:SetImageColor

DImage:SetImageColor( table col )

Description

Sets the image's color override.

Arguments

1 table col
The color override of the image. Uses the Color.

Example

Creates a frame with a Portal box inside and sets the color to green.

-- Frame MainFrame = vgui.Create("DFrame") MainFrame:SetSize(200, 180) MainFrame:Center() MainFrame:SetTitle("Color example") -- Image of a Portal box local metalbox_img = vgui.Create("DImage", MainFrame) metalbox_img:SetPos(35, 35) metalbox_img:SetSize(128, 128) metalbox_img:SetImage("spawnicons/models/props/metal_box_128.png") metalbox_img:SetImageColor(Color(128, 255, 0, 255))
Output:

Page Links


Special Pages


Wikis

?

Render Time: 37ms

DB GetPage 5
Generate Html 3
SaveChanges (1) 17
Render Body 0
Render Sidebar 9