DShape/SetType

From Garry's Mod
Jump to: navigation, search
 DShape:SetType( )

Contents

DescriptionPanelFunc

Sets the shape to be drawn.

Arguments

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.

Examples

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)


Personal tools
Navigation