Garry's Mod Wiki

Revision Difference

DShape:SetType#515401

<function name="SetType" parent="DShape" type="panelfunc">⤶ <ispanel>yes</ispanel>⤶ <description>Sets the shape to be drawn.</description>⤶ <realm>Client</realm>⤶ <args>⤶ <arg name="type" type="string">The render type of the DShape. Only rectangles (`Rect`) work currently. If you don&#x27;t define a type immediately, the &lt;page&gt;PANEL:Paint&lt;/page&gt; method will generate errors until you do.</arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>⤶ Creates a DShape and sets the render type.|Code=⤶ local Shape = vgui.Create( "DShape" )⤶ Shape:SetType( "Rect" )⤶ Shape:SetSize(500,500)⤶ Shape:SetPos(10, 10)⤶ </description>⤶ ⤶ </example>