@Override protected void actionPerformed(GuiButton button) { if (System.currentTimeMillis() - buttoncooldown >= 50) { if (button.id == 2 && modifier > 0) { modifier--; } else if (button.id == 3) { if (modifier < view.getSizeY() - 1) modifier++; } else { modifier = 0; } } // renderq = 22.5F; super.actionPerformed(button); this.initGui(); }
@Override public void initGui() { super.initGui(); int j = (width - xSize) / 2; int k = (height - ySize) / 2; String file = "Textures/GUIs/Handbook/buttons.png"; if (page == ChromaResearch.USINGRUNES && subpage == 1 && view.getSizeY() > 1) { buttonList.add( new CustomSoundImagedGuiButton( 3, j + 230, k + 75, 12, 10, 100, 6, file, ChromatiCraft.class, this)); buttonList.add( new CustomSoundImagedGuiButton( 2, j + 230, k + 85, 12, 10, 112, 6, file, ChromatiCraft.class, this)); } }
private void renderRunes(int posX, int posY) { RuneShapeRenderer.instance.render( view, posX + xSize / 2, posY + ySize / 2 + 8, modifier + view.getMinY()); }