use of com.infinityraider.agricraft.gui.component.ComponentRenderer in project AgriCraft by AgriCraft.
the class GuiJournal method addNavArrows.
private void addNavArrows() {
GuiComponent leftArrow = new GuiComponentBuilder<>(LEFT_ARROW, 1, 170, 32, 32).setRenderAction(ComponentRenderer::renderIconComponent).setMouseEnterAction((c, p) -> c.setVisable(this.currentPageNumber > 0)).setMouseLeaveAction((c, p) -> c.setVisable(false)).setMouseClickAction((c, p) -> incPage(-1)).setVisable(false).build();
GuiComponent rightArrow = new GuiComponentBuilder<>(RIGHT_ARROW, 223, 170, 32, 32).setRenderAction(ComponentRenderer::renderIconComponent).setMouseEnterAction((c, p) -> c.setVisable(this.currentPageNumber < this.getNumberOfPages() - 1)).setMouseLeaveAction((c, p) -> c.setVisable(false)).setMouseClickAction((c, p) -> incPage(1)).setVisable(false).build();
this.addComponent(leftArrow);
this.addComponent(rightArrow);
}
Aggregations