TextBox Input
Captures text strings typed by the user, updating variables on focus loss.
TextBox Input#
1local TextBox = Section:CreateTextBox(name, placeholder, callback, description)
placeholder (string): Initial placeholder text.
callback (function): Passes string text and enterPressed boolean.
TextBox Methods#
TextBox:SetValue(text): Force text value.
TextBox:GetValue(): Returns current text string.
Complete Code Example#
Here is a complete copy-pasteable script showing how to build and read textbox inputs:
1local ValincUi = loadstring(game:HttpGet("https://cdn.vinzhub.com/scripts/Liblery%20Ui/VALINC-QUARTZ/57319f29599c47672f19f8d56d53ffbe/a6b3ccb1f04d1d7d06232a9c5d25779e2af89c12992bebae.lua"))()
2
3local Window = ValincUi:CreateWindow("Input Hub", "edit-3", "gold")
4local Tab = Window:CreateTab("Config")
5local Section = Tab:CreateSection("Webhook Configurations")
6
7-- Create a text input box
8local WebhookInput = Section:CreateTextBox("Discord Webhook URL", "Paste webhook link here...", function(text, enterPressed)
9 print("Webhook input updated: " .. text)
10 if enterPressed then
11 print("User hit ENTER key to confirm!")
12 end
13end, "Input your discord webhook URL to log drops and farming summaries.")
14
15-- Set value programmatically
16Section:CreateButton("Load Default Webhook", function()
17 WebhookInput:SetValue("https://discord.com/api/webhooks/default_placeholder")
18end, "Overwrites the textbox string with a fallback link.")