Elements

Here is an explanation of menu elements and their respected properties.

Creating a Tab

To start adding your own elements, you must create a tab using juju.create_tab; shown below.

juju.create_tab(name: String)
Argument
Type
Description

name

String

The tab's name, providing no name will default it to the addon's file name

Creating Sections

To create a section, you must create a section using juju.create_section; this will error if a tab is not created beforehand.

juju.create_section(name: String, size: Number, side: Number, offset: Number)
Argument
Type
Description

name

String

The section's name

side

Number

The side the section will be placed on in the tab, 1 = left, 2 = light

size

Number

The vertical size of the section (0.1-1)

offset

Number

The vertical offset of the section (0-0.9)

Creating Elements

To create a section, you must create a section using juju.create_element.

When using juju.create_element there is an argument labeled types. Below is a fully working addon example of how to properly set up this argument.

juju.create_tab()
juju.create_section("example_section", 1, 1, 0)

juju["create_element"]("example_section", {
    ["name"] = "example colorpicker"
}, {
    ["colorpicker"] = {
        ["color_flag"] = "example_color",
        ["default_color"] = Color3.fromRGB(0,255,0),
        ["transparency_flag"] = "example_transparency",
        ["default_transparency"] = 0
    }
})

Last updated