Garry's Mod Wiki

DShape:SetType

  DShape:SetType( string type )

Description

Sets the shape to be drawn.

Arguments

1 string type
The render type of the DShape. Only rectangles (Rect) work currently. If you don't define a type immediately, the PANEL:Paint method will generate errors until you do.

Example

Creates a DShape and sets the render type.

local Shape = vgui.Create( "DShape" ) Shape:SetType( "Rect" ) Shape:SetSize(500,500) Shape:SetPos(10, 10)