The vgui library allows you to script and create your own panels using Valve's GUI system.
For an alphabetically ordered list of VGUI panels, see VGUI Element List.
Panel vgui.Create( string classname, Panel parent = nil, string name = "nil" )
Creates a panel by the specified classname. Custom VGUI elements are not loaded instantly. Use GM:OnGamemodeLoaded to create them on startup.
Panel vgui.CreateFromTable( table metatable, Panel parent = nil, string name = "nil" )
Creates a panel from table.
Panel vgui.CreateX( string class, Panel parent = nil, string name = "nil" )
This is used internally - although you're able to use it you probably shouldn't. Creates a engine panel.
boolean vgui.FocusedHasParent( Panel parent )
Returns whether the currently focused panel is a child of the given one.
table vgui.GetControlTable( string Panelname )
Gets the method table of this panel. Does not return parent methods!
Returns the panel the cursor is hovering above. This returns a cached value that is only updated after rendering and before the next VGUI Think/Layout pass. ie. it lags one frame behind panel layout and is completely unhelpful for PANEL:Paint if your panels are moving around under the mouse a lot every frame.
Returns the global world panel which is the parent to all others, except for the HUD panel. See also GetHUDPanel.
table vgui.Register( string classname, table panelTable, string baseName = "Panel" )
Registers a panel for later creation.