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() = defaultTextInput(Message label, Message placeholder,
std::optional<std::string> default_text = std::nullopt) getDefaultValue
std::optional<std::string> getDefaultValue() constGets the default text of the text input field.
Returns:
The default text of the text input field.
getLabel
Message getLabel() constGets the label of the text input field.
Returns:
The label of the text input field.
getPlaceholder
Message getPlaceholder() constGets 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:
textThe 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:
labelThe 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:
placeholderThe new placeholder for the text input field.
Returns:
A reference to the text input field itself.
Last updated on