Garry's Mod Wiki

PANEL:Init

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

Page Links


Special Pages


Wikis

?

Render Time: 33ms

DB GetPage 5
Generate Html 0
SaveChanges (1) 12
Render Body 0
Render Sidebar 13