UI Kit
  • Guide
    • Getting Started
    • Installation
    • Design Principles
    • Comparison with other UI Kits
  • API References
    • Element
    • Theme
    • Common Props
  • Components
    • Button
    • Input
Powered by GitBook
On this page
  1. API References

Element

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.position
element.size
element.alpha
element.visible
element.parent -- !IMPORTANT: this is returns an id
element.children
element.disabled
element.renderMode
element.renderIndex
PreviousComparison with other UI KitsNextTheme

Last updated 7 months ago