DImageButton/SetColor

From Garry's Mod
Jump to: navigation, search
 DImageButton:SetColor( )

Contents

DescriptionPanelFunc

Sets the color of the image. Equivalent of DImage:SetImageColor

Arguments

table color

The Color to set

Examples

Example

Changes the image to blue:

-- E.g. for the Engineer (blue)
local engineerClass = vgui.Create("DImageButton", container)
engineerClass:SetColor(Color(22, 166, 236, 255))
-- ...

Output:

Without SetColor(...)
With SetColor(...)
Personal tools
Navigation