Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 7510a52

Browse files
committed
Добавлены новые методы в SimpleForm для добавления текста
1 parent 3a9207e commit 7510a52

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/main/java/ru/nukkitx/forms/elements/SimpleForm.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ public SimpleForm setContent(String value) {
4040
return this;
4141
}
4242

43+
public SimpleForm addContent(String value){
44+
((FormWindowSimple) form).setContent(((FormWindowSimple) form).getContent() + value);
45+
return this;
46+
}
47+
48+
public SimpleForm addContentLine(String value){
49+
return addContent(value + "\n");
50+
}
51+
52+
public SimpleForm addContentOnNextLine(String value){
53+
return addContent("\n" + value);
54+
}
55+
4356
public SimpleForm addButton(String text) {
4457
((FormWindowSimple) form).addButton(new ElementButton(text));
4558
return this;

0 commit comments

Comments
 (0)