Dropdown Menu
Single option choice list supporting built-in real-time search filtering.
Dropdown Selector#
1local Dropdown = Section:CreateDropdown(name, list, default, callback, description)
list (array): Options array.
default (string): Initial selection.
Dropdown Methods#
Dropdown:SetValue(value): Set selection value.
Dropdown:Refresh(newList, newDefault): Rebuild choices list dynamically.
Dropdown:GetValue(): Returns currently active selection.
Complete Code Example#
Here is a complete copy-pasteable script showing how to build and update dropdown widgets:
1local ValincUi = loadstring(game:HttpGet("https://cdn.vinzhub.com/scripts/Liblery%20Ui/VALINC-QUARTZ/57319f29599c47672f19f8d56d53ffbe/a6b3ccb1f04d1d7d06232a9c5d25779e2af89c12992bebae.lua"))()
2
3local Window = ValincUi:CreateWindow("Selector Hub", "filter", "gold")
4local Tab = Window:CreateTab("Combat")
5local Section = Tab:CreateSection("Target Settings")
6
7local targetOptions = {"Goblin", "Orc", "Dragon", "Troll"}
8
9-- Create a dropdown widget
10local TargetDropdown = Section:CreateDropdown("Select Target NPC", targetOptions, "Goblin", function(selectedValue)
11 print("Selected Target: " .. selectedValue)
12end, "Choose the monster that Auto Farm will target.")
13
14-- Add a button to dynamically refresh target list (e.g. when entering a new area)
15Section:CreateButton("Update Target List", function()
16 local nextAreaTargets = {"Fire Elemental", "Ice Giant", "Void Warden"}
17 TargetDropdown:Refresh(nextAreaTargets, "Fire Elemental")
18 print("Dropdown refreshed with new area targets!")
19end, "Changes selection options to match the current zone's NPCs.")