endstone::TextInput
Represents a text input field.
Functions:
Name | Description |
---|---|
TextInput | |
TextInput | |
getDefaultValue | Gets the default text of the text input field. |
getLabel | Gets the label of the text input field. |
getPlaceholder | Gets the placeholder of the text input field. |
setDefaultValue | Sets the default text of the text input field. |
setLabel | Sets the label of the text input field. |
setPlaceholder | Sets the placeholder of the text input field. |
TextInput
TextInput() = default
TextInput(Message label, Message placeholder,
std::optional<std::string> default_text = std::nullopt)
getDefaultValue
std::optional<std::string> getDefaultValue() const
Gets the default text of the text input field.
Returns:
The default text of the text input field.
getLabel
Message getLabel() const
Gets the label of the text input field.
Returns:
The label of the text input field.
getPlaceholder
Message getPlaceholder() const
Gets the placeholder of the text input field.
Returns:
The placeholder of the text input field.
setDefaultValue
TextInput &setDefaultValue(std::optional<std::string> text)
Sets the default text of the text input field.
Parameters:
text
The new default text for the text input field.
Returns:
A reference to the text input field itself.
setLabel
TextInput &setLabel(Message label)
Sets the label of the text input field.
Parameters:
label
The new label for the text input field.
Returns:
A reference to the text input field itself.
setPlaceholder
TextInput &setPlaceholder(Message placeholder)
Sets the placeholder of the text input field.
Parameters:
placeholder
The new placeholder for the text input field.
Returns:
A reference to the text input field itself.
Last updated on