@Override protected void drawTextureBox(int hoverState){ GuiUtils.drawContinuousTexturedBox(CREATIVE_TABS, this.xPosition, this.yPosition, 0, 64 + (hoverState > 0 ? 36 : 0), this.width, this.height, TAB_DIM, TAB_DIM, TAB_BORDER, TAB_BORDER, TAB_BORDER, TAB_BORDER, this.zLevel); } }
protected void drawTextureBox(int hoverState){ GuiUtils.drawContinuousTexturedBox(CREATIVE_TABS, this.xPosition, this.yPosition, 0, 2 + (hoverState > 0 ? 30 : 0), this.width, this.height, TAB_DIM, TAB_DIM, TAB_BORDER, TAB_BORDER, TAB_BORDER, TAB_BORDER, this.zLevel); }
@Override public void drawButton(Minecraft mc, int mouseX, int mouseY, float partial) { if (visible) { hovered = mouseX >= x && mouseY >= y && mouseX < x + boxWidth && mouseY < y + height; GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, x + (width - boxWidth), y, 0, 46, boxWidth, height, 200, 20, 2, 3, 2, 2, zLevel); mouseDragged(mc, mouseX, mouseY); int color = 14737632; if (!enabled) { color = 10526880; } else { color = 4210752; } if (isChecked) { //drawCenteredString(mc.fontRenderer, "✔", x + (width - boxWidth) + boxWidth / 2 + 1, y + 1, 0x00FF00); drawCenteredString(mc.fontRenderer, "x", x + (width - boxWidth) + boxWidth / 2 + 1, y + 1, 0x00FF00); } drawStringNoShadow(mc.fontRenderer, displayString, x, y + 2, color); } }
@Override public void drawButton(Minecraft mc, int mouseX, int mouseY, float p) { if (this.visible) { //render super.drawButton(mc, mouseX, mouseY, p); ResourceLocation BUTTON_TEXTURES = new ResourceLocation(Const.MODID, "textures/gui/slot_magic.png"); int k = this.getHoverState(this.hovered); GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.x, this.y, 0, 0, this.width, this.height, 200, 20, 0, 0, 0, 0, this.zLevel); if (!stackRender.isEmpty()) ModCyclic.proxy.renderItemOnScreen(this.stackRender, this.x + 2, this.y + 2); } }