@Override public void initGui() { super.initGui(); if (ClientProxy.tconstructEnabled) { this.buttonList.clear(); try { if (equipTab == null) { equipTab = Class.forName("mods.battlegear2.client.gui.controls.EquipGearTab"); } ClientProxy.updateTab.invoke(null, guiLeft, guiTop, equipTab); ClientProxy.addTabs.invoke(null, this.buttonList); } catch (Exception e) { ClientProxy.tconstructEnabled = false; } } }
public void initGui() { super.initGui(); int cornerX = guiLeft; int cornerY = (this.height - this.ySize) / 2; this.buttonList.clear(); // InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new // ItemStack(Block.workbench), 0); // this.buttonList.add(tab); // tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new // ItemStack(Item.plateDiamond), 1); // tab.enabled = false; // this.buttonList.add(tab); TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabArmorExtended.class); TabRegistry.addTabsToList(this.buttonList); }
public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); this.xSize_lo = (float) par1; this.ySize_lo = (float) par2; // if (stats.inventory[2] != null && stats.inventory[2].getItem() == TContent.knapsack) // { // if (this.buttonList.size() < 3) // { // int cornerX = guiLeft; // int cornerY = (this.height - this.ySize) / 2; // InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new // ItemStack(TContent.knapsack), 1); // this.buttonList.add(tab); // } // } // else // { // if (this.buttonList.size() >= 3) // { // buttonList.remove(2); // } // } }
/** Draws the screen and all the components in it. */ @Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); this.xSize_lo = (float) par1; this.ySize_lo = (float) par2; }