Element¶
GenericUI_Element
is the base class that all built-in elements inherit from.
GenericUI_Element Class¶
Methods¶
AddChild¶
@param id string
@param elementType `T`|GenericUI_ElementType
Destroy¶
GetChildIndex¶
Returns the child index of this element within its parent.
GetChildren¶
Returns the children of the element.
GetGlobalPosition¶
Returns the global position of the element within the UI.
GetHeight¶
Returns the height of the element.
@param considerOverrides boolean?
If `true`, height overrides will be considered. Defaults to `true`.
GetMovieClip¶
Get the movie clip of this element.
GetParent¶
Returns the parent element.
GetPosition¶
GetRawHeight¶
Returns the height of the element without considering its children.
GetRawSize¶
Gets the size of the element without considering its children.
GetRawWidth¶
Returns the width of the element without considering its children.
GetScale¶
Returns the scale of the element.
GetScreenPosition¶
Returns the position of the element in screen-space.
@param floor boolean?
If `true`, values returned will be floored. Defaults to `true`.
GetSize¶
Returns the size of the element.
@param considerOverrides boolean?
If `true`, width/height overrides will be considered. Defaults to `true`.
GetSizeOverride¶
Returns the size override of the element, if any.
GetWidth¶
Returns the width of the element.
@param considerOverrides boolean?
If `true`, width overrides will be considered. Defaults to `true`.
IsVisible¶
Returns whether the element is visible.
Move¶
Moves the element a certain amount of pixels from its current position.
@param x number
@param y number
RemoveChild¶
@param element GenericUI_Element
RemoveScrollRect¶
Removes the scroll rect from the element, if any.
SetAlpha¶
@param alpha number
@param affectChildren boolean?
Defaults to not affecting children alpha.
SetAsDraggableArea¶
Sets this element as the area for dragging the entire UI.
SetCenterInLists¶
Sets whether the element should be horizontally centered in VerticalList and ScrollList.
@param center boolean
SetChildIndex¶
Sets the Z-order index of a child element.
@param child string|GenericUI_Element
@param index integer
SetMouseChildren¶
@param enabled boolean
SetMouseEnabled¶
@param enabled boolean
SetMouseMoveEventEnabled¶
Sets whether the element can throw MouseMove events.
These are disabled by default.
@param enabled boolean
SetPosition¶
@param x number
@param y number
SetPositionRelativeToParent¶
Sets the position of the element relative to its parent.
@param position GenericUI_Element_RelativePosition
@param horizontalOffset number?
@param verticalOffset number?
SetRotation¶
@param degrees number
SetScale¶
Sets the scale of the element.
@param scale Vector2
SetScrollRect¶
Sets the scroll rect of the element.
@param position Vector2
@param size Vector2
SetSize¶
@param width number
@param height number
SetSizeOverride¶
Sets the size override, used to override the element size within list-like elements.
@param width number
@param height number
SetTooltip¶
Sets the tooltip of the element.
@param tooltipType TooltipLib_TooltipType
@param tooltip any?
TODO document
SetVisible¶
@param visible boolean
Tween¶
@param tween GenericUI_ElementTween
__UpdateChildOrder¶
Updates the order of the internal children table by MC child index.