Garry's Mod Wiki

Garry's Mod Wiki

  PANEL:Init()

Description

Called when the panel is created. This is called for each base type that the panel has.

Example

Shows how this method is called recursively for each base type a panel has.

local BASE = {} function BASE:Init() print("Base Init Called") end local PANEL = {} function PANEL:Init() print("Panel Init Called") end vgui.Register("MyBase", BASE, "DFrame") vgui.Register("MyPanel", PANEL, "MyBase") local panel = vgui.Create("MyPanel")
Output: Base Init Called

Panel Init Called

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...