AddLabel

Add label to group box

Syntax

Groupbox:AddDropdown({Index = "unique tool index", Text = "Text", Default = 1, Values = {"Option 1", "Option 2", "Option 3"}})

Index value is optional. Values table must have at least 1 value to work (I think💀)

Dropdown:OnChanged(function(value) -- If dropdown value changed
    print(value)
end)

Dropdown:SetValues(table) --// Replace dropdown items
Dropdown:Show() 
Dropdown:Hide() 
Dropdown:SetValue(val) --// Index of item OR item name
Dropdown:AddTooltip("Tooltip Text")

Example

Code shown below is missing some critical syntax for simplicity

local Dropdown = Groupbox:AddDropdown({Index = "dropdown_1", Text = "GUI Theme", Default = 1, Values = {"Dark", "Light"}})

--// If dropdown value changes
Dropdown:OnChanged(function(value)
    if value == "Dark" then
        Window.FontColor = {255, 255, 255}; 
        Window.MainColor = {25, 25, 25};
        Window.BackgroundColor = {20, 20, 20};
        Window.AccentColor = {255, 50, 255}; 
        Window.OutlineColor = {40, 40, 40};
    else
        Window.FontColor = {69, 69, 69}; 
        Window.MainColor = {150, 150, 150};
        Window.BackgroundColor = {200, 200, 200};
        Window.AccentColor = {255, 50, 255}; 
        Window.OutlineColor = {100, 100, 100};
    end
end)
Dropdown Demo

Last updated