All components have a common inherited class. Thus, it offers a common point of view and a flexible ease of use to all components.
The common functions of all components are specified as follows:
void Element:destroy()void Element:createEvent()bool Element:setRenderIndex()bool Element:setRenderMode()bool Element:setId()bool Element:hasChild()int Element:getChildCount()bool Element:removeChildren()bool Element:setVisible(bool state)bool Element:isVisible()bool Element:setDisabled(bool state)bool Element:isDisabled()bool Element:setPosition(Vector2 { x =0, y =0 })bool Element:setSize(Vector2 { x =0, y =0 })bool Element:setPostGUI(bool state)bool Element:setAlpha(int alpha)bool Element:setParent(Element element)
Here are some getter variables you might find useful:
local element = Element:new()element.positionelement.sizeelement.alphaelement.visibleelement.parent -- !IMPORTANT: this is returns an idelement.childrenelement.disabledelement.renderModeelement.renderIndex