Garry's Mod Wiki

vgui.RegisterFile

  table vgui.RegisterFile( string file )

Description

Registers a new VGUI panel from a file, to be used with vgui.CreateFromTable.

File file must use the PANEL global that is provided just before the file is included, for example:

PANEL.Base = "Panel" function PANEL:Init() -- Your code... end function PANEL:Think() -- Your code... end

Arguments

1 string file
The file to register

Returns

1 table
A table containing info about the panel.