Class DialogInput.Text.Builder
java.lang.Object
fr.fidorial.dialog.DialogInput.Text.Builder
- Enclosing class:
DialogInput.Text
Fluent builder for
DialogInput.Text.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the built input control.label(ComponentLike label) labelVisible(boolean labelVisible) maxLength(int maxLength) Turns the field into a text area.width(int width)
-
Method Details
-
label
- Parameters:
label- the label displayed to the left of the field- Returns:
- this builder
- Since:
- 0.1.0
-
width
- Parameters:
width- the width of the field- Returns:
- this builder
- Since:
- 0.1.0
-
labelVisible
- Parameters:
labelVisible- whether the label is drawn at all- Returns:
- this builder
- Since:
- 0.1.0
-
initial
- Parameters:
initial- the value the field starts with- Returns:
- this builder
- Since:
- 0.1.0
-
maxLength
- Parameters:
maxLength- the largest number of characters the player may type- Returns:
- this builder
- Since:
- 0.1.0
-
multiline
@Contract("_, _ -> this") public DialogInput.Text.Builder multiline(@Nullable Integer maxLines, @Nullable Integer height) Turns the field into a text area.- Parameters:
maxLines- the largest number of lines accepted, ornullfor no limitheight- the height of the area, ornullfor the client default- Returns:
- this builder
- Since:
- 0.1.0
-
build
Returns the built input control.- Returns:
- the built input control
- Since:
- 0.1.0
-