use of com.kkllffaa.meteorutils.utils.screens.EditIntScreen in project meteor-utils by kkllffaa.
the class BetterBookBot method calculatewidget.
private void calculatewidget(WVerticalList list, GuiTheme theme) {
list.clear();
WHorizontalList filebuttons = list.add(theme.horizontalList()).expandX().widget();
filebuttons.add(theme.button((file != null) ? file.getName() : "Select File")).padLeft(6).expandX().widget().action = () -> {
String path = TinyFileDialogs.tinyfd_openFileDialog("Select File", new File(MeteorClient.FOLDER, "bookbot.txt").getAbsolutePath(), filters, null, false);
if (path != null) {
file = new File(path);
} else
file = null;
buildstring();
calculatewidget(list, theme);
};
filebuttons.add(theme.button(GuiRenderer.RESET)).padRight(6).widget().action = () -> {
buildstring();
calculatewidget(list, theme);
};
list.add(theme.button("iterator: " + iterator)).padHorizontal(6).expandX().widget().action = () -> mc.setScreen(new EditIntScreen(theme, "iterator", iterator, false, (a) -> {
iterator = a;
calculatewidget(list, theme);
}));
list.add(theme.button("count: " + bookCount)).padHorizontal(6).expandX().widget().action = () -> mc.setScreen(new EditIntScreen(theme, "count", bookCount, false, (a) -> {
bookCount = a;
calculatewidget(list, theme);
}));
}
Aggregations