🖼️UIPanel
UIPanel metatable
:__tostring(): nil
nil
:__eq(other: UIPanel
): boolean
UIPanel
): boolean
Overload for operator ==.
other
id
string
id of the child.
Finds child by name.
:IsVisible(): boolean
boolean
Returns visible state.
:SetVisible(newState: boolean
): nil
boolean
): nil
newState
boolean
Sets visible state.
:GetClassList(): string[]
string[]
Returns class name list.
id
string
???.
id
string
???.
id
string
Recursive find child by id.
:GetChildCount(): integer
integer
Returns child by count.
index
number
Returns child by index.
path
string[]
bLogError [?]
boolean
Log error if panel not found. (default: false)
Returns child by path using FindChild.
:GetChildIndex(): integer
integer
Returns index in parent children list. Starts from 0.
:GetFirstChild(): UIPanel
|nil
UIPanel
|nil
Returns first child.
:GetLastChild(): UIPanel
|nil
UIPanel
|nil
Returns last child.
:HasID(): boolean
boolean
Returns true
if the panel has an id.
:GetID(): string
string
Returns id of panel.
:SetID(id: string
): nil
string
): nil
id
string
Sets the panel's id.
:GetLayoutHeight(): integer
integer
Returns the panel height.
:GetLayoutWidth(): integer
integer
Returns the panel width.
:GetParent(): UIPanel
|nil
UIPanel
|nil
Returns the panel's parent.
:GetRootParent(): UIPanel
|nil
UIPanel
|nil
Returns the panel's root parent. ???
:GetXOffset(): integer
integer
Returns the panel's relative X offset.
:GetYOffset(): integer
integer
Returns the panel's relative Y offset.
:GetBounds(): {x:number, y:number, w:number, h:number}
{x:number, y:number, w:number, h:number}
Returns the panel's bounds. Iterate over the parent hierarchy to get the absolute bounds.
:GetPanelType(): string
string
Returns the panel's type.
:BSetProperty(key: string
, value: string
): boolean
string
, value: string
): boolean
key
string
value
string
Sets the panel property.
:SetStyle(cssString: string
): boolean
string
): boolean
cssString
string
Sets the panel style.
Example
:SetAttribute(key: string
, value: string
): nil
string
, value: string
): nil
key
string
value
string
Sets the panel's attribute.
:GetAttribute(key: string
, default: string
): string|nil
string
, default: string
): string|nil
key
string
default
string
Returns the panel's attribute.
:GetText(): string
string
This method is only available for Label panels.
Returns the panel's text.
:SetText(text: string
): nil
string
): nil
This method is only available for Label panels.
text
string
Sets the panel's text.
:AddClasses(classNames: string
): nil
string
): nil
classNames
string
Could be a space separated list of classes.
Adds a class to the panel.
:RemoveClasses(classNames: string
): nil
string
): nil
classNames
string
Could be a space separated list of classes.
Removes a class to the panel.
Last updated