Garry's Mod Wiki

Revision Difference

DImageButton:SetColor#513610

<function name="SetColor" parent="DImageButton" type="panelfunc">⤶ <ispanel>yes</ispanel>⤶ <description>Sets the color of the image. Equivalent of <page>DImage:SetImageColor</page></description>⤶ <realm>Client</realm>⤶ <args>⤶ <arg name="color" type="table">The &lt;page&gt;Global.Color&lt;/page&gt; to set</arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>Changes the image to blue:</description>⤶ <code>⤶ -- E.g. for the Engineer (blue)⤶ local engineerClass = vgui.Create("DImageButton", container)⤶ engineerClass:SetColor(Color(22, 166, 236, 255))⤶ -- ...⤶ </code>⤶ <output></output>⤶ ⤶ </example>