TextField
A TextField UI element allows users to input text into a text box.
To add a textField UI element to your mod, use the utils.addTextField
function. This function takes the following parameters:
The utils.addTextField
function takes several parameters:
section
is the UI section that the TextField should be added to.key
is a unique identifier for the TextField.title is the title that will be displayed for the TextField.
defaultValue
The default value of the TextField (optional).descriptio
A description of the textField (optional).placeholder
place holder text of the textField.
You can access the current value of a TextField using the getValueForKey
function:
This will return the current value of the TextField with the textValKey
identifier.
Last updated