@Override public void drawButton(Minecraft mc, int x, int y) { if (this.visible) { int k = this.getHoverState(this.field_146123_n) - 1; TFC_Core.bindTexture(GuiPlanSelection.texture); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.drawTexturedModalRect(this.xPosition, this.yPosition, 176, k * 18, 18, 18); this.field_146123_n = isPointInRegion( x, y); // x >= this.xPosition && y >= this.yPosition && x < this.xPosition + this.width // && y < this.yPosition + this.height; if (item != null) { renderInventorySlot(item, this.xPosition + 1, this.yPosition + 1); } this.mouseDragged(mc, x, y); if (field_146123_n) { FontRenderer fontrenderer = Minecraft.getMinecraft().fontRenderer; screen.drawTooltip(x, y, this.displayString); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } } }