Creating Dynamic Inputs
Creation Snippet
local Input = Groupbox:CreateInput({
Name = "Dynamic Input",
Icon = NebulaIcons:GetIcon('text-cursor-input', 'Lucide'),
CurrentValue = "",
PlaceholderText = "Placeholder Text",
Callback = function(Text)
end,
}, "INDEX")
This is just a snippet, not all parameters are included
Replace INDEX with a unique identifier of the instance that is not repeated.
Parameters
Name : string
The Text that shows in the button.
Tooltip : string NOT REQUIRED
A Description that shows up after hovering over the element after a short amount of time.
Icon : number NOT REQUIRED
The Icon that shows up next to the title.
CurrentValue : string
The current text in the Input.
PlaceholderText : string NOT REQUIRED
Text to show when there is none in the Input.
RemoveTextAfterFocusLost : boolean NOT REQUIRED
Whether to clear the Input after the user clicks off.
Numeric : boolean NOT REQUIRED
Whether to only allow Numbers to be inputed.
Enter : boolean NOT REQUIRED
Whether to only call the callback once the user clicks the return
key.
MaxCharacters : number NOT REQUIRED
If an integer that is not 0, the characters in the Input will be limited to this amount.
RemoveTextOnFocus : boolean NOT REQUIRED
Similar to RemoveTextAfterFocusLost
, this clears the Input. However instead of after focus lost, its after focusing.
Callback : function
The function that takes place when the Input receives well, Inputs.
Passed Parameters:
- Text : string
The Current Value of the Input.