🟩attach

CLIENT

:attach( ᵖᵃⁿᵉˡ child, ᵇᵒᵒˡ bNoDestroy)

▸ Parameters

pnl child child panel to attach to parent

bool bNoDestroy determines if parent panel not destroyable

▸ Description

Attaches a child panel to a parent. Only works with specialized rlib panels such as rlib.ui.overlay which have func PANEL:Attach( )

▸ Notes

Opposite of uclass.attachpar( )

▸ Example

local pnl_ol           = ui.new( 'rlib.ui.overlay'             )
:register              ( 'pnl_root', mod                       )

local pnl_par          = ui.rlib( mod, 'base', pnl_ol, 1       )
:candrag               ( false                                 )

pnl_ol:Attach          ( pnl_par                               )
pnl_ol:NoDestroy       ( true                                  )

Last updated