use of logictechcorp.libraryex.client.gui.ScrollableButtonList in project NetherEx by LogicTechCorp.
the class CustomizeNetherExWorldTypeScreen method init.
@Override
public void init() {
this.addButton(new Button((this.width / 2) - 45, (this.height - 27), 90, 20, I18n.format("gui.done"), (button) -> this.minecraft.displayGuiScreen(this.createWorldScreen)));
List<ScrollableButtonList.ButtonData> buttonDataList = new ArrayList<>();
for (int i = 0; i < this.compatibleWorldTypes.size(); i++) {
WorldType worldType = this.compatibleWorldTypes.get(i);
buttonDataList.add(new ScrollableButtonList.ButtonData(I18n.format("selectWorld.customizeType") + " " + I18n.format(worldType.getTranslationKey()), i * 160, button -> worldType.onCustomizeButton(this.minecraft, this.createWorldScreen)));
}
this.guiScrollableButtonList = new ScrollableButtonList(this.createWorldScreen, this.width, this.height, 32, this.height - 32, buttonDataList);
}
Aggregations