@Override
public void drawButton(Minecraft mc, int x, int y, float partialTicks) {
if (thisVisible) super.drawButton(mc, x, y, partialTicks);
if (visible) {
if (renderedStacks != null) {
int middleX = this.x + width / 2;
int startX = middleX - renderedStacks.length * 9 + 1;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
RenderHelper.enableGUIStandardItemLighting();
for (int i = 0; i < renderedStacks.length; i++) {
itemRenderer.renderItemAndEffectIntoGUI(renderedStacks[i], startX + i * 18, this.y + 2);
}
RenderHelper.disableStandardItemLighting();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
if (resLoc != null) {
mc.getTextureManager().bindTexture(resLoc);
drawModalRectWithCustomSizedTexture(this.x + width / 2 - 8, this.y + 2, 0, 0, 16, 16, 16, 16);
}
if (enabled && !thisVisible && x >= this.x && y >= this.y && x < this.x + width && y < this.y + height) {
Gui.drawRect(this.x, this.y, this.x + width, this.y + height, invisibleHoverColor);
}
}
}
GuiButtonSpecial.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:pnc-repressurized
作者:
评论列表
文章目录