mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-23 21:49:58 +00:00
Move GUI textures to versioned folder
Also adds infrastructure to repeat this very easily
This commit is contained in:
1 parent
a7c88fff59
commit
beb02f56a2
73 files changed
+163
-123
No files matched your search
@@ -18,7 +18,6 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.api.client.gui.ITabPanel;
|
||||
import com.enderio.core.api.client.render.IWidgetIcon;
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
@@ -31,9 +30,10 @@ import crazypants.enderio.conduit.me.IMEConduit;
|
||||
import crazypants.enderio.conduit.oc.IOCConduit;
|
||||
import crazypants.enderio.conduit.power.IPowerConduit;
|
||||
import crazypants.enderio.conduit.redstone.IRedstoneConduit;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
|
||||
public class GuiExternalConnection extends GuiContainerBase {
|
||||
public class GuiExternalConnection extends GuiContainerBaseEIO {
|
||||
|
||||
private static final int TAB_HEIGHT = 24;
|
||||
|
||||
@@ -67,7 +67,7 @@ public class GuiExternalConnection extends GuiContainerBase {
|
||||
private final ExternalConnectionContainer container;
|
||||
|
||||
public GuiExternalConnection(InventoryPlayer playerInv, IConduitBundle bundle, ForgeDirection dir) {
|
||||
super(new ExternalConnectionContainer(playerInv, bundle, dir));
|
||||
super(new ExternalConnectionContainer(playerInv, bundle, dir), "externalConduitConnection", "itemFilter");
|
||||
container = (ExternalConnectionContainer) inventorySlots;
|
||||
this.playerInv = playerInv;
|
||||
this.bundle = bundle;
|
||||
@@ -186,7 +186,7 @@ public class GuiExternalConnection extends GuiContainerBase {
|
||||
|
||||
tes.draw();
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/externalConduitConnection.png");
|
||||
bindGuiTexture();
|
||||
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
RenderUtil.bindTexture(IconEIO.TEXTURE);
|
||||
|
||||
@@ -271,7 +271,7 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
}
|
||||
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.bindGuiTexture(1);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft(), gui.getGuiTop() + 55, 0, 55, gui.getXSize(), 145);
|
||||
|
||||
FontRenderer fr = gui.getFontRenderer();
|
||||
@@ -283,7 +283,7 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
x = gui.getGuiLeft() + filterX;
|
||||
y = gui.getGuiTop() + filterY;
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/externalConduitConnection.png");
|
||||
gui.bindGuiTexture();
|
||||
gui.drawTexturedModalRect(x, y, 24, 238, 90, 18);
|
||||
|
||||
FluidFilter filter = eConduit.getFilter(gui.getDir(), isInput);
|
||||
|
||||
@@ -8,12 +8,12 @@ import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.CycleButton;
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
import com.enderio.core.client.gui.button.ToggleButton;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnection;
|
||||
import crazypants.enderio.conduit.item.filter.FuzzyMode;
|
||||
import crazypants.enderio.conduit.item.filter.ItemFilter;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
|
||||
public class BasicItemFilterGui implements IItemFilterGui {
|
||||
@@ -25,7 +25,7 @@ public class BasicItemFilterGui implements IItemFilterGui {
|
||||
private static final int ID_STICKY = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_FUZZY = GuiExternalConnection.nextButtonId();
|
||||
|
||||
private final GuiContainerBase gui;
|
||||
private final GuiContainerBaseEIO gui;
|
||||
|
||||
private final ToggleButton useMetaB;
|
||||
private final ToggleButton useNbtB;
|
||||
@@ -44,11 +44,12 @@ public class BasicItemFilterGui implements IItemFilterGui {
|
||||
private int xOffset;
|
||||
private int yOffset;
|
||||
|
||||
public BasicItemFilterGui(GuiContainerBase gui, IItemFilterContainer filterContainer, boolean isStickyModeAvailable) {
|
||||
public BasicItemFilterGui(GuiContainerBaseEIO gui, IItemFilterContainer filterContainer, boolean isStickyModeAvailable) {
|
||||
this(gui, filterContainer, isStickyModeAvailable, 32, 68, 0);
|
||||
}
|
||||
|
||||
public BasicItemFilterGui(GuiContainerBase gui, IItemFilterContainer filterContainer, boolean isStickyModeAvailable, int xOffset, int yOffset,
|
||||
public BasicItemFilterGui(GuiContainerBaseEIO gui, IItemFilterContainer filterContainer, boolean isStickyModeAvailable,
|
||||
int xOffset, int yOffset,
|
||||
int buttonIdOffset) {
|
||||
this.gui = gui;
|
||||
this.isStickyModeAvailable = isStickyModeAvailable;
|
||||
@@ -186,7 +187,7 @@ public class BasicItemFilterGui implements IItemFilterGui {
|
||||
@Override
|
||||
public void renderCustomOptions(int top, float par1, int par2, int par3) {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.bindGuiTexture(1);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset, gui.getGuiTop() + yOffset, 0, 238, 18 * 5, 18);
|
||||
if(filter.isAdvanced()) {
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset, gui.getGuiTop() + yOffset + 20, 0, 238, 18 * 5, 18);
|
||||
|
||||
@@ -368,7 +368,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
return;
|
||||
}
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.bindGuiTexture(1);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft(), gui.getGuiTop() + 55, 0, 55, gui.getXSize(), 145);
|
||||
|
||||
FontRenderer fr = gui.getFontRenderer();
|
||||
@@ -387,13 +387,13 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
} else {
|
||||
//draw speed upgrade slot
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.bindGuiTexture(1);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9 + 18, gui.getGuiTop() + 46, 94, 238, 18, 18);
|
||||
}
|
||||
|
||||
//filter upgrade slot
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.bindGuiTexture(1);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9, gui.getGuiTop() + 46, 94, 220, 18, 18);
|
||||
|
||||
//function upgrade slot
|
||||
|
||||
@@ -104,7 +104,7 @@ public class ModItemFilterGui implements IItemFilterGui {
|
||||
@Override
|
||||
public void renderCustomOptions(int top, float par1, int par2, int par3) {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/externalConduitConnection.png");
|
||||
gui.bindGuiTexture();
|
||||
for(Rectangle r : inputBounds) {
|
||||
//slot
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + r.x - 1, gui.getGuiTop() + r.y - 1, 24, 214, 18, 18);
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package crazypants.enderio.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
|
||||
public abstract class GuiContainerBaseEIO extends GuiContainerBase {
|
||||
|
||||
private static final String TEXTURE_PATH = ":textures/gui/23/";
|
||||
private static final String TEXTURE_EXT = ".png";
|
||||
|
||||
private final List<ResourceLocation> guiTextures = new ArrayList<ResourceLocation>();
|
||||
|
||||
public GuiContainerBaseEIO(Container par1Container, String... guiTexture) {
|
||||
super(par1Container);
|
||||
for (String string : guiTexture) {
|
||||
guiTextures.add(new ResourceLocation(EnderIO.DOMAIN + TEXTURE_PATH + string + TEXTURE_EXT));
|
||||
}
|
||||
}
|
||||
|
||||
public void bindGuiTexture() {
|
||||
bindGuiTexture(0);
|
||||
}
|
||||
|
||||
public void bindGuiTexture(int id) {
|
||||
RenderUtil.bindTexture(getGuiTexture(id));
|
||||
}
|
||||
|
||||
protected ResourceLocation getGuiTexture(int id) {
|
||||
return guiTextures.size() > id ? guiTextures.get(id) : null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class GuiAlloySmelter extends GuiPoweredMachineBase<TileAlloySmelter> {
|
||||
protected static final int SMELT_MODE_BUTTON_ID = 76;
|
||||
|
||||
public GuiAlloySmelter(InventoryPlayer par1InventoryPlayer, TileAlloySmelter furnaceInventory) {
|
||||
super(furnaceInventory, new ContainerAlloySmelter(par1InventoryPlayer, furnaceInventory));
|
||||
super(furnaceInventory, new ContainerAlloySmelter(par1InventoryPlayer, furnaceInventory), "alloySmelter");
|
||||
|
||||
vanillaFurnaceButton = new IIconButton(getFontRenderer(), SMELT_MODE_BUTTON_ID, 0, 0, null, RenderUtil.BLOCK_TEX);
|
||||
vanillaFurnaceButton.setSize(BUTTON_SIZE, BUTTON_SIZE);
|
||||
@@ -94,7 +94,7 @@ public class GuiAlloySmelter extends GuiPoweredMachineBase<TileAlloySmelter> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/alloySmelter.png");
|
||||
bindGuiTexture();
|
||||
int sx = guiLeft;
|
||||
int sy = guiTop;
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
|
||||
|
||||
private static final String TEXTURE_SIMPLE = "enderio:textures/gui/buffer.png";
|
||||
private static final String TEXTURE_FULL = "enderio:textures/gui/buffer_full.png";
|
||||
private static final String TEXTURE_SIMPLE = "buffer";
|
||||
private static final String TEXTURE_FULL = "buffer_full";
|
||||
|
||||
private TextFieldEnder maxInput;
|
||||
private TextFieldEnder maxOutput;
|
||||
@@ -27,12 +27,10 @@ public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
|
||||
private int lastInput, lastOutput;
|
||||
|
||||
public GuiBuffer(InventoryPlayer par1InventoryPlayer, TileBuffer te) {
|
||||
super(te, new ContainerBuffer(par1InventoryPlayer, te));
|
||||
super(te, new ContainerBuffer(par1InventoryPlayer, te), TEXTURE_SIMPLE, TEXTURE_FULL);
|
||||
redstoneButton.setPosition(isFull() ? 153 : 120, 24);
|
||||
configB.setPosition(isFull() ? 153 : 120, 42);
|
||||
|
||||
FontRenderer fnt = Minecraft.getMinecraft().fontRenderer;
|
||||
|
||||
if(te.hasPower()) {
|
||||
int x = (isFull() ? 20 : 58);
|
||||
int y = guiTop + 27;
|
||||
@@ -137,13 +135,13 @@ public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
RenderUtil.bindTexture(isFull() ? TEXTURE_FULL : TEXTURE_SIMPLE);
|
||||
bindGuiTexture(isFull() ? 1 : 0);
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);
|
||||
|
||||
RenderUtil.bindTexture(TEXTURE_SIMPLE);
|
||||
bindGuiTexture();
|
||||
|
||||
if(getTileEntity().hasPower()) {
|
||||
drawPowerBg(sx, sy);
|
||||
@@ -171,6 +169,7 @@ public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
|
||||
return getTileEntity().hasInventory() && getTileEntity().hasPower();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderSlotHighlights(IoMode mode) {
|
||||
if (!getTileEntity().hasInventory()) {
|
||||
return;
|
||||
|
||||
@@ -13,7 +13,6 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.widget.GuiToolTip;
|
||||
import com.enderio.core.client.gui.widget.TextFieldEnder;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
@@ -21,6 +20,7 @@ import com.enderio.core.common.util.BlockCoord;
|
||||
import com.enderio.core.common.vecmath.VecmathUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.RedstoneModeButton;
|
||||
import crazypants.enderio.machine.IRedstoneModeControlable;
|
||||
import crazypants.enderio.machine.IoMode;
|
||||
@@ -34,7 +34,7 @@ import crazypants.enderio.machine.gui.GuiPoweredMachineBase;
|
||||
import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiCapBank extends GuiContainerBase {
|
||||
public class GuiCapBank extends GuiContainerBaseEIO {
|
||||
|
||||
private static final CapBankClientNetwork NULL_NETWORK = new CapBankClientNetwork(-1);
|
||||
|
||||
@@ -76,7 +76,7 @@ public class GuiCapBank extends GuiContainerBase {
|
||||
private final ContainerCapBank container;
|
||||
|
||||
public GuiCapBank(Entity player, InventoryPlayer playerInv, TileCapBank te) {
|
||||
super(new ContainerCapBank(playerInv, te));
|
||||
super(new ContainerCapBank(playerInv, te), "capacitorBank");
|
||||
capBank = te;
|
||||
container = (ContainerCapBank) inventorySlots;
|
||||
|
||||
@@ -240,7 +240,7 @@ public class GuiCapBank extends GuiContainerBase {
|
||||
requestStateUpdate();
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/capacitorBank.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class GuiCrafter extends GuiPoweredMachineBase<TileCrafter> {
|
||||
private final ToggleButton bufferSizeB;
|
||||
|
||||
public GuiCrafter(InventoryPlayer par1InventoryPlayer, TileCrafter te) {
|
||||
super(te, new ContainerCrafter(par1InventoryPlayer, te));
|
||||
super(te, new ContainerCrafter(par1InventoryPlayer, te), "crafter");
|
||||
xSize = getXSize();
|
||||
|
||||
int x = getXSize() - 5 - 16;
|
||||
@@ -98,7 +98,7 @@ public class GuiCrafter extends GuiPoweredMachineBase<TileCrafter> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/crafter.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import crazypants.enderio.machine.gui.GuiPoweredMachineBase;
|
||||
public class GuiCrusher extends GuiPoweredMachineBase<TileCrusher> {
|
||||
|
||||
public GuiCrusher(InventoryPlayer par1InventoryPlayer, TileCrusher inventory) {
|
||||
super(inventory, new ContainerCrusher(par1InventoryPlayer, inventory));
|
||||
super(inventory, new ContainerCrusher(par1InventoryPlayer, inventory), "crusher");
|
||||
addToolTip(new GuiToolTip(new Rectangle(142, 23, 5, 17), "") {
|
||||
|
||||
@Override
|
||||
@@ -34,7 +34,7 @@ public class GuiCrusher extends GuiPoweredMachineBase<TileCrusher> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/crusher.png");
|
||||
bindGuiTexture();
|
||||
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
|
||||
@@ -7,22 +7,21 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.obelisk.attractor.ContainerAttractor;
|
||||
|
||||
public class GuiEnchanter extends GuiContainerBase {
|
||||
public class GuiEnchanter extends GuiContainerBaseEIO {
|
||||
|
||||
private TileEnchanter te;
|
||||
private ContainerEnchanter container;
|
||||
private IconButton recipeButton;
|
||||
|
||||
public GuiEnchanter(EntityPlayer player, InventoryPlayer inventory, TileEnchanter te) {
|
||||
super(new ContainerEnchanter(player, inventory, te));
|
||||
super(new ContainerEnchanter(player, inventory, te), "enchanter");
|
||||
container = (ContainerEnchanter)inventorySlots;
|
||||
this.te = te;
|
||||
|
||||
@@ -42,7 +41,7 @@ public class GuiEnchanter extends GuiContainerBase {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/enchanter.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
|
||||
@@ -60,7 +59,7 @@ public class GuiEnchanter extends GuiContainerBase {
|
||||
col = 8453920; //all good
|
||||
} else {
|
||||
col = 16736352; //not enough levels
|
||||
RenderUtil.bindTexture("enderio:textures/gui/enchanter.png");
|
||||
bindGuiTexture();
|
||||
drawTexturedModalRect(sx + 99, sy + 33, 176, 0, 28, 21);
|
||||
}
|
||||
String s = I18n.format("container.repair.cost", new Object[] {Integer.valueOf(curCost)});
|
||||
|
||||
@@ -24,7 +24,7 @@ public class GuiFarmStation extends GuiPoweredMachineBase<TileFarmStation> {
|
||||
private static final int LOCK_ID = 1234;
|
||||
|
||||
public GuiFarmStation(InventoryPlayer par1InventoryPlayer, TileFarmStation machine) {
|
||||
super(machine, new FarmStationContainer(par1InventoryPlayer, machine));
|
||||
super(machine, new FarmStationContainer(par1InventoryPlayer, machine), "farmStation");
|
||||
setYSize(ySize + 3);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class GuiFarmStation extends GuiPoweredMachineBase<TileFarmStation> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/farmStation.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
@@ -80,7 +80,7 @@ public class GuiFarmStation extends GuiPoweredMachineBase<TileFarmStation> {
|
||||
fr.drawString("NE", sx + 73, sy + 66, ColorUtil.getARGB(1f,1f,0.35f,1f), true);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/farmStation.png");
|
||||
bindGuiTexture();
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -21,7 +21,7 @@ import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
public class GuiCombustionGenerator extends GuiPoweredMachineBase<TileCombustionGenerator> {
|
||||
|
||||
public GuiCombustionGenerator(InventoryPlayer par1InventoryPlayer, TileCombustionGenerator te) {
|
||||
super(te, new ContainerCombustionEngine(par1InventoryPlayer, te));
|
||||
super(te, new ContainerCombustionEngine(par1InventoryPlayer, te), "combustionGen");
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(114, 21, 15, 47), "") {
|
||||
|
||||
@@ -79,7 +79,7 @@ public class GuiCombustionGenerator extends GuiPoweredMachineBase<TileCombustion
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/combustionGen.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);
|
||||
@@ -113,7 +113,7 @@ public class GuiCombustionGenerator extends GuiPoweredMachineBase<TileCombustion
|
||||
//center coolant chamber
|
||||
RenderUtil.renderGuiTank(gen.getCoolantTank().getFluid(), 1000, Math.min(gen.getCoolantTank().getFluidAmount(), 1000), x, y + 14, zLevel, 33, 33);
|
||||
//draw some gui over the top again to make the center shape
|
||||
RenderUtil.bindTexture("enderio:textures/gui/combustionGen.png");
|
||||
bindGuiTexture();
|
||||
drawTexturedModalRect(x, y + 14, 0, 223, 33, 33);
|
||||
y += 7;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class GuiCombustionGenerator extends GuiPoweredMachineBase<TileCombustion
|
||||
.renderGuiTank(gen.getFuelTank().getFluid(), 1000, Math.min(gen.getFuelTank().getFluidAmount(), 1000), guiLeft + 81, guiTop + 38, zLevel, 14, 14);
|
||||
}
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/combustionGen.png");
|
||||
bindGuiTexture();
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ import crazypants.enderio.power.Capacitors;
|
||||
public class GuiStirlingGenerator extends GuiPoweredMachineBase<TileEntityStirlingGenerator> {
|
||||
|
||||
public GuiStirlingGenerator(InventoryPlayer par1InventoryPlayer, TileEntityStirlingGenerator te) {
|
||||
super(te, new StirlingGeneratorContainer(par1InventoryPlayer, te));
|
||||
super(te, new StirlingGeneratorContainer(par1InventoryPlayer, te), "stirlingGenerator");
|
||||
|
||||
final StirlingGeneratorContainer c = (StirlingGeneratorContainer)inventorySlots;
|
||||
Rectangle r = new Rectangle(c.getUpgradeOffset(), new Dimension(16, 16));
|
||||
@@ -85,7 +85,7 @@ public class GuiStirlingGenerator extends GuiPoweredMachineBase<TileEntityStirli
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/stirlingGenerator.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
public class GuiZombieGenerator extends GuiPoweredMachineBase<TileZombieGenerator> {
|
||||
|
||||
public GuiZombieGenerator(InventoryPlayer inventory, final TileZombieGenerator tileEntity) {
|
||||
super(tileEntity, new ContainerZombieGenerator(inventory, tileEntity));
|
||||
super(tileEntity, new ContainerZombieGenerator(inventory, tileEntity), "zombieGenerator");
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(80, 21, 15, 47), "") {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class GuiZombieGenerator extends GuiPoweredMachineBase<TileZombieGenerato
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/zombieGenerator.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);
|
||||
@@ -90,7 +90,7 @@ public class GuiZombieGenerator extends GuiPoweredMachineBase<TileZombieGenerato
|
||||
}
|
||||
}
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/zombieGenerator.png");
|
||||
bindGuiTexture();
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.inventory.Slot;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.api.common.util.IProgressTile;
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
import com.enderio.core.client.gui.widget.GuiToolTip;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
@@ -21,6 +20,7 @@ import com.enderio.core.common.util.Util;
|
||||
import com.enderio.core.common.vecmath.Vector4f;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.gui.IoConfigRenderer.SelectedFace;
|
||||
import crazypants.enderio.gui.RedstoneModeButton;
|
||||
@@ -28,7 +28,7 @@ import crazypants.enderio.machine.AbstractMachineEntity;
|
||||
import crazypants.enderio.machine.IoMode;
|
||||
import crazypants.enderio.machine.SlotDefinition;
|
||||
|
||||
public abstract class GuiMachineBase<T extends AbstractMachineEntity> extends GuiContainerBase {
|
||||
public abstract class GuiMachineBase<T extends AbstractMachineEntity> extends GuiContainerBaseEIO {
|
||||
|
||||
public static final Vector4f PUSH_COLOR = new Vector4f(0.8f, 0.4f, 0.1f, 0.5f);
|
||||
public static final Vector4f PULL_COLOR = new Vector4f(0.1f, 0.4f, 0.8f, 0.5f);
|
||||
@@ -50,8 +50,8 @@ public abstract class GuiMachineBase<T extends AbstractMachineEntity> extends Gu
|
||||
protected List<GuiToolTip> progressTooltips;
|
||||
protected int lastProgressTooltipValue = -1;
|
||||
|
||||
protected GuiMachineBase(T machine, Container par1Container) {
|
||||
super(par1Container);
|
||||
protected GuiMachineBase(T machine, Container par1Container, String... guiTexture) {
|
||||
super(par1Container, guiTexture);
|
||||
tileEntity = machine;
|
||||
|
||||
xSize = getXSize();
|
||||
|
||||
@@ -21,8 +21,8 @@ public abstract class GuiPoweredMachineBase<T extends AbstractPoweredMachineEnti
|
||||
protected static final int POWER_HEIGHT = 42;
|
||||
protected static final int BOTTOM_POWER_Y = POWER_Y + POWER_HEIGHT;
|
||||
|
||||
public GuiPoweredMachineBase(T machine, Container container) {
|
||||
super(machine, container);
|
||||
public GuiPoweredMachineBase(T machine, Container container, String... guiTexture) {
|
||||
super(machine, container, guiTexture);
|
||||
if(renderPowerBar()) {
|
||||
addToolTip(new GuiToolTip(new Rectangle(getPowerX(), getPowerY(), getPowerWidth(), getPowerHeight()), "") {
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.api.client.gui.IGuiOverlay;
|
||||
import com.enderio.core.api.client.gui.ListSelectionListener;
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
import com.enderio.core.client.gui.button.ToggleButton;
|
||||
import com.enderio.core.client.gui.widget.GuiScrollableList;
|
||||
@@ -24,6 +23,7 @@ import com.enderio.core.common.util.BlockCoord;
|
||||
import com.enderio.core.common.util.PlayerUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.gui.RedstoneModeButton;
|
||||
import crazypants.enderio.machine.hypercube.TileHyperCube.IoMode;
|
||||
@@ -31,7 +31,7 @@ import crazypants.enderio.machine.hypercube.TileHyperCube.SubChannel;
|
||||
import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiHyperCube extends GuiContainerBase {
|
||||
public class GuiHyperCube extends GuiContainerBaseEIO {
|
||||
|
||||
protected static final int POWER_INPUT_BUTTON_ID = 1;
|
||||
protected static final int POWER_OUTPUT_BUTTON_ID = 2;
|
||||
@@ -78,7 +78,7 @@ public class GuiHyperCube extends GuiContainerBase {
|
||||
private RedstoneModeButton rsB;
|
||||
|
||||
public GuiHyperCube(TileHyperCube te) {
|
||||
super(new ContainerHyperCube());
|
||||
super(new ContainerHyperCube(), "hyperCube");
|
||||
this.cube = te;
|
||||
|
||||
xSize = 245;
|
||||
@@ -338,7 +338,7 @@ public class GuiHyperCube extends GuiContainerBase {
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/hyperCube.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class GuiInventoryPanel extends GuiMachineBase<TileInventoryPanel> {
|
||||
private final Rectangle btnAddStoredRecipe = new Rectangle();
|
||||
|
||||
public GuiInventoryPanel(TileInventoryPanel te, Container container) {
|
||||
super(te, container);
|
||||
super(te, container, "inventorypanel");
|
||||
redstoneButton.visible = false;
|
||||
configB.visible = false;
|
||||
|
||||
@@ -283,7 +283,7 @@ public class GuiInventoryPanel extends GuiMachineBase<TileInventoryPanel> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int mouseX, int mouseY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/inventorypanel.png");
|
||||
bindGuiTexture();
|
||||
int sx = guiLeft;
|
||||
int sy = guiTop;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class GuiKillerJoe extends GuiMachineBase<TileKillerJoe> {
|
||||
private IconButton xp10B;
|
||||
|
||||
public GuiKillerJoe(InventoryPlayer inventory, final TileKillerJoe tileEntity) {
|
||||
super(tileEntity, new ContainerKillerJoe(inventory, tileEntity));
|
||||
super(tileEntity, new ContainerKillerJoe(inventory, tileEntity), "killerJoe");
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(18, 11, 15, 47), "") {
|
||||
|
||||
@@ -98,7 +98,7 @@ public class GuiKillerJoe extends GuiMachineBase<TileKillerJoe> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/killerJoe.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package crazypants.enderio.machine.monitor;
|
||||
|
||||
import static crazypants.enderio.machine.power.PowerDisplayUtil.formatPower;
|
||||
import static crazypants.enderio.machine.power.PowerDisplayUtil.formatPowerFloat;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Rectangle;
|
||||
import java.text.NumberFormat;
|
||||
@@ -13,7 +16,6 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.CheckBox;
|
||||
import com.enderio.core.client.gui.widget.GuiToolTip;
|
||||
import com.enderio.core.client.gui.widget.TextFieldEnder;
|
||||
@@ -21,13 +23,13 @@ import com.enderio.core.client.render.ColorUtil;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.ContainerNoInv;
|
||||
import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
import static crazypants.enderio.machine.power.PowerDisplayUtil.*;
|
||||
|
||||
public class GuiPowerMonitor extends GuiContainerBase {
|
||||
public class GuiPowerMonitor extends GuiContainerBaseEIO {
|
||||
|
||||
private static final NumberFormat INT_NF = NumberFormat.getIntegerInstance();
|
||||
|
||||
@@ -73,7 +75,7 @@ public class GuiPowerMonitor extends GuiContainerBase {
|
||||
private String noNetworkError;
|
||||
|
||||
public GuiPowerMonitor(InventoryPlayer playerInv, final TilePowerMonitor te) {
|
||||
super(new ContainerNoInv(te));
|
||||
super(new ContainerNoInv(te), "powerMonitor");
|
||||
this.te = te;
|
||||
xSize = WIDTH;
|
||||
ySize = HEIGHT;
|
||||
@@ -179,7 +181,7 @@ public class GuiPowerMonitor extends GuiContainerBase {
|
||||
protected void drawGuiContainerBackgroundLayer(float ptick, int mouseX, int mouseY) {
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/powerMonitor.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class GuiAttractor extends GuiPoweredMachineBase<TileAttractor> {
|
||||
private final ToggleButton showRangeB;
|
||||
|
||||
public GuiAttractor(InventoryPlayer par1InventoryPlayer, TileAttractor te) {
|
||||
super(te, new ContainerAttractor(par1InventoryPlayer, te));
|
||||
super(te, new ContainerAttractor(par1InventoryPlayer, te), "attractor");
|
||||
|
||||
int x = getXSize() - 5 - BUTTON_SIZE;
|
||||
showRangeB = new ToggleButton(this, RANGE_ID, x, 44, IconEIO.PLUS, IconEIO.MINUS);
|
||||
@@ -58,7 +58,7 @@ public class GuiAttractor extends GuiPoweredMachineBase<TileAttractor> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/attractor.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class GuiAversionObelisk extends GuiPoweredMachineBase<TileAversionObelis
|
||||
private static final int RANGE_ID = 8738924;
|
||||
|
||||
public GuiAversionObelisk(InventoryPlayer par1InventoryPlayer, TileAversionObelisk te) {
|
||||
super(te, new ContainerAversionObelisk(par1InventoryPlayer, te));
|
||||
super(te, new ContainerAversionObelisk(par1InventoryPlayer, te), "attractor");
|
||||
|
||||
int x = getXSize() - 5 - BUTTON_SIZE;
|
||||
showRangeB = new ToggleButton(this, RANGE_ID, x, 44, IconEIO.PLUS, IconEIO.MINUS);
|
||||
@@ -48,7 +48,7 @@ public class GuiAversionObelisk extends GuiPoweredMachineBase<TileAversionObelis
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/attractor.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@ import crazypants.enderio.machine.gui.GuiPoweredMachineBase;
|
||||
public class GuiInhibitorObelisk extends GuiPoweredMachineBase<TileInhibitorObelisk> {
|
||||
|
||||
public GuiInhibitorObelisk(TileInhibitorObelisk machine, Container container) {
|
||||
super(machine, container);
|
||||
super(machine, container, "inhibitor");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/inhibitor.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -22,11 +22,10 @@ import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiWeatherObelisk extends GuiPoweredMachineBase<TileWeatherObelisk> {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("enderio:textures/gui/weatherObelisk.png");
|
||||
private static final NumberFormat fmt = NumberFormat.getNumberInstance();
|
||||
|
||||
public GuiWeatherObelisk(InventoryPlayer inventory, TileWeatherObelisk tileEntity) {
|
||||
super(tileEntity, new ContainerWeatherObelisk(inventory, tileEntity));
|
||||
super(tileEntity, new ContainerWeatherObelisk(inventory, tileEntity), "weatherObelisk");
|
||||
|
||||
addProgressTooltip(79, 29, 18, 31);
|
||||
}
|
||||
@@ -82,7 +81,7 @@ public class GuiWeatherObelisk extends GuiPoweredMachineBase<TileWeatherObelisk>
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
this.mc.renderEngine.bindTexture(texture);
|
||||
bindGuiTexture();
|
||||
|
||||
this.drawTexturedModalRect(getGuiLeft(), getGuiTop(), 0, 0, getXSize(), getYSize());
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GuiExperienceObelisk extends GuiMachineBase<TileExperienceObelisk>
|
||||
private IconButton mmm;
|
||||
|
||||
public GuiExperienceObelisk(InventoryPlayer playerInv, TileExperienceObelisk te) {
|
||||
super(te, new ContainerNoInv(te));
|
||||
super(te, new ContainerNoInv(te), "experianceObelisk");
|
||||
ySize = 115;
|
||||
|
||||
int spacing = 5;
|
||||
@@ -130,7 +130,7 @@ public class GuiExperienceObelisk extends GuiMachineBase<TileExperienceObelisk>
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/experianceObelisk.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import crazypants.enderio.machine.gui.GuiPoweredMachineBase;
|
||||
public class GuiPainter extends GuiPoweredMachineBase<TileEntityPainter> {
|
||||
|
||||
public GuiPainter(InventoryPlayer par1InventoryPlayer, TileEntityPainter te) {
|
||||
super(te, new PainterContainer(par1InventoryPlayer, te));
|
||||
super(te, new PainterContainer(par1InventoryPlayer, te), "painter");
|
||||
|
||||
addProgressTooltip(88, 34, 24, 16);
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class GuiPainter extends GuiPoweredMachineBase<TileEntityPainter> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/painter.png");
|
||||
bindGuiTexture();
|
||||
int k = guiLeft;
|
||||
int l = guiTop;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.enderio.core.client.render.RenderUtil;
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.gui.RedstoneModeButton;
|
||||
import crazypants.enderio.machine.IRedstoneModeControlable;
|
||||
@@ -30,7 +31,7 @@ import crazypants.enderio.machine.gui.GuiOverlayIoConfig;
|
||||
import crazypants.enderio.machine.gui.GuiPoweredMachineBase;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiCapacitorBank extends GuiContainerBase {
|
||||
public class GuiCapacitorBank extends GuiContainerBaseEIO {
|
||||
|
||||
protected static final int INPUT_BUTTON_ID = 18;
|
||||
protected static final int OUTPUT_BUTTON_ID = 37;
|
||||
@@ -63,7 +64,7 @@ public class GuiCapacitorBank extends GuiContainerBase {
|
||||
private IconButton configB;
|
||||
|
||||
public GuiCapacitorBank(Entity player, InventoryPlayer playerInv, TileCapacitorBank te) {
|
||||
super(new ContainerCapacitorBank(player, playerInv, te));
|
||||
super(new ContainerCapacitorBank(player, playerInv, te), "capacitorBank");
|
||||
this.capBank = te;
|
||||
|
||||
xSize = 176 + 42;
|
||||
@@ -259,7 +260,7 @@ public class GuiCapacitorBank extends GuiContainerBase {
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/capacitorBank.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import crazypants.enderio.machine.killera.ContainerKillerJoe;
|
||||
public class GuiSliceAndSplice extends GuiPoweredMachineBase<TileSliceAndSplice> {
|
||||
|
||||
public GuiSliceAndSplice(InventoryPlayer par1InventoryPlayer, TileSliceAndSplice te) {
|
||||
super(te, new ContainerSliceAndSplice(par1InventoryPlayer, te));
|
||||
super(te, new ContainerSliceAndSplice(par1InventoryPlayer, te), "sliceAndSplice");
|
||||
|
||||
addProgressTooltip(103, 49, 24, 16);
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class GuiSliceAndSplice extends GuiPoweredMachineBase<TileSliceAndSplice>
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/sliceAndSplice.png");
|
||||
bindGuiTexture();
|
||||
int k = guiLeft;
|
||||
int l = guiTop;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class GuiSoulBinder extends GuiPoweredMachineBase<TileSoulBinder> {
|
||||
private final IconButton usePlayerXP;
|
||||
|
||||
public GuiSoulBinder(InventoryPlayer par1InventoryPlayer, TileSoulBinder te) {
|
||||
super(te, new ContainerSoulBinder(par1InventoryPlayer, te));
|
||||
super(te, new ContainerSoulBinder(par1InventoryPlayer, te), "soulFuser");
|
||||
usePlayerXP = new IconButton(this, PLAYER_XP_ID, 125, 57, IconEIO.XP);
|
||||
usePlayerXP.visible = false;
|
||||
usePlayerXP.setToolTip("Use Player XP");
|
||||
@@ -59,7 +59,7 @@ public class GuiSoulBinder extends GuiPoweredMachineBase<TileSoulBinder> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/soulFuser.png");
|
||||
bindGuiTexture();
|
||||
int k = guiLeft;
|
||||
int l = guiTop;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class GuiSoulBinder extends GuiPoweredMachineBase<TileSoulBinder> {
|
||||
|
||||
ExperienceBarRenderer.render(this, getGuiLeft() + 56, getGuiTop() + 68, 65, binder.getContainer(), binder.getCurrentlyRequiredLevel());
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/soulFuser.png");
|
||||
bindGuiTexture();
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class GuiPoweredSpawner extends GuiPoweredMachineBase<TilePoweredSpawner>
|
||||
private String header;
|
||||
|
||||
public GuiPoweredSpawner(InventoryPlayer par1InventoryPlayer, TilePoweredSpawner te) {
|
||||
super(te, new ContainerPoweredSpawner(par1InventoryPlayer, te));
|
||||
super(te, new ContainerPoweredSpawner(par1InventoryPlayer, te), "poweredSpawner");
|
||||
|
||||
modeB = MultiIconButton.createRightArrowButton(this, 8888, 115, 10);
|
||||
modeB.setSize(10, 16);
|
||||
@@ -77,7 +77,7 @@ public class GuiPoweredSpawner extends GuiPoweredMachineBase<TilePoweredSpawner>
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/poweredSpawner.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
@@ -97,7 +97,7 @@ public class GuiPoweredSpawner extends GuiPoweredMachineBase<TilePoweredSpawner>
|
||||
int y = sy + fr.FONT_HEIGHT + 6;
|
||||
fr.drawStringWithShadow(header, x, y, ColorUtil.getRGB(Color.WHITE));
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/poweredSpawner.png");
|
||||
bindGuiTexture();
|
||||
|
||||
if(spawnMode) {
|
||||
drawTexturedModalRect(sx + 80, sy + 34, 207, 0, 17, 15);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class GuiTank extends GuiMachineBase<TileTank> {
|
||||
private CycleButton<VoidMode> voidBut;
|
||||
|
||||
public GuiTank(InventoryPlayer par1InventoryPlayer, TileTank te) {
|
||||
super(te, new ContainerTank(par1InventoryPlayer, te));
|
||||
super(te, new ContainerTank(par1InventoryPlayer, te), "tank");
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(80, 21, 16, 47), "") {
|
||||
|
||||
@@ -120,7 +120,7 @@ public class GuiTank extends GuiMachineBase<TileTank> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/tank.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class FilterTab implements ITabPanel {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
//Inventory
|
||||
RenderUtil.bindTexture("enderio:textures/gui/transceiver.png");
|
||||
parent.bindGuiTexture();
|
||||
Point invRoot = container.getPlayerInventoryOffset();
|
||||
parent.drawTexturedModalRect(left + invRoot.x - 1, top + invRoot.y - 1, 24, 180, 162, 76);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class GeneralTab implements ITabPanel {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
//Inventory
|
||||
RenderUtil.bindTexture("enderio:textures/gui/transceiver.png");
|
||||
parent.bindGuiTexture();
|
||||
Point invRoot = container.getPlayerInventoryOffset();
|
||||
parent.drawTexturedModalRect(left + invRoot.x - 1, top + invRoot.y - 1, 24, 180, 162, 76);
|
||||
|
||||
@@ -103,7 +103,7 @@ public class GeneralTab implements ITabPanel {
|
||||
parent.renderSlotHighlights();
|
||||
|
||||
//Power
|
||||
RenderUtil.bindTexture("enderio:textures/gui/transceiver.png");
|
||||
parent.bindGuiTexture();
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
x = left + parent.getPowerX() - 1;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class GuiTransceiver extends GuiPoweredMachineBase<TileTransceiver> {
|
||||
GeneralTab generalTab;
|
||||
|
||||
public GuiTransceiver(InventoryPlayer par1InventoryPlayer, TileTransceiver te) {
|
||||
super(te, new ContainerTransceiver(par1InventoryPlayer, te));
|
||||
super(te, new ContainerTransceiver(par1InventoryPlayer, te), "transceiver", "itemFilter");
|
||||
|
||||
generalTab = new GeneralTab(this);
|
||||
tabs.add(generalTab);
|
||||
@@ -211,7 +211,7 @@ public class GuiTransceiver extends GuiPoweredMachineBase<TileTransceiver> {
|
||||
|
||||
tes.draw();
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/transceiver.png");
|
||||
bindGuiTexture();
|
||||
drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.MultiIconButton;
|
||||
import com.enderio.core.client.gui.button.ToggleButton;
|
||||
import com.enderio.core.client.gui.widget.GhostSlot;
|
||||
@@ -23,12 +22,12 @@ import com.enderio.core.common.util.BlockCoord;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.item.filter.ItemFilter;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.gui.RedstoneModeButton;
|
||||
import crazypants.enderio.machine.killera.ContainerKillerJoe;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiVacuumChest extends GuiContainerBase {
|
||||
public class GuiVacuumChest extends GuiContainerBaseEIO {
|
||||
|
||||
private static final int RANGE_LEFT = 145;
|
||||
private static final int RANGE_TOP = 86;
|
||||
@@ -57,7 +56,7 @@ public class GuiVacuumChest extends GuiContainerBase {
|
||||
private final String headerInventory;
|
||||
|
||||
public GuiVacuumChest(EntityPlayer player, InventoryPlayer inventory, TileVacuumChest te) {
|
||||
super(new ContainerVacuumChest(player, inventory, te));
|
||||
super(new ContainerVacuumChest(player, inventory, te), "vacumChest");
|
||||
this.te = te;
|
||||
|
||||
ySize = 206;
|
||||
@@ -175,7 +174,7 @@ public class GuiVacuumChest extends GuiContainerBase {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int mouseX, int mouseY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/vacumChest.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
@@ -25,12 +25,12 @@ import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiVat extends GuiPoweredMachineBase<TileVat> {
|
||||
|
||||
private static final String GUI_TEXTURE = "enderio:textures/gui/vat.png";
|
||||
private static final String GUI_TEXTURE = "vat";
|
||||
|
||||
private final IconButton dump1, dump2;
|
||||
|
||||
public GuiVat(InventoryPlayer inventory, TileVat te) {
|
||||
super(te, new ContainerVat(inventory, te));
|
||||
super(te, new ContainerVat(inventory, te), GUI_TEXTURE);
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(30, 12, 15, 47), "") {
|
||||
|
||||
@@ -99,7 +99,7 @@ public class GuiVat extends GuiPoweredMachineBase<TileVat> {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture(GUI_TEXTURE);
|
||||
bindGuiTexture();
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
TileVat vat = getTileEntity();
|
||||
|
||||
@@ -154,7 +154,7 @@ public class GuiVat extends GuiPoweredMachineBase<TileVat> {
|
||||
}
|
||||
}
|
||||
|
||||
RenderUtil.bindTexture(GUI_TEXTURE);
|
||||
bindGuiTexture();
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public class GuiVat extends GuiPoweredMachineBase<TileVat> {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
RenderUtil.bindTexture(GUI_TEXTURE);
|
||||
bindGuiTexture();
|
||||
drawTexturedModalRect(x, y, 0, 256 - 28, 26, 28);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.CheckBox;
|
||||
import com.enderio.core.client.gui.widget.TextFieldEnder;
|
||||
import com.enderio.core.client.render.ColorUtil;
|
||||
@@ -20,11 +19,12 @@ import com.enderio.core.common.util.BlockCoord;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.api.teleport.ITravelAccessable;
|
||||
import crazypants.enderio.api.teleport.ITravelAccessable.AccessMode;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.enderio.teleport.packet.PacketAccessMode;
|
||||
import crazypants.enderio.teleport.packet.PacketLabel;
|
||||
|
||||
public class GuiTravelAccessable extends GuiContainerBase {
|
||||
public class GuiTravelAccessable extends GuiContainerBaseEIO {
|
||||
|
||||
private static final int ID_PUBLIC = 0;
|
||||
private static final int ID_PRIVATE = 1;
|
||||
@@ -52,7 +52,7 @@ public class GuiTravelAccessable extends GuiContainerBase {
|
||||
}
|
||||
|
||||
public GuiTravelAccessable(ContainerTravelAccessable container) {
|
||||
super(container);
|
||||
super(container, "travelAccessable");
|
||||
this.te = container.ta;
|
||||
this.world = container.world;
|
||||
|
||||
@@ -137,7 +137,7 @@ public class GuiTravelAccessable extends GuiContainerBase {
|
||||
@Override
|
||||
public void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/travelAccessable.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
@@ -196,7 +196,7 @@ public class GuiTravelAccessable extends GuiContainerBase {
|
||||
super.drawForegroundImpl(mouseX, mouseY);
|
||||
|
||||
if(te.getAccessMode() != AccessMode.PROTECTED) {
|
||||
RenderUtil.bindTexture("enderio:textures/gui/travelAccessable.png");
|
||||
bindGuiTexture();
|
||||
GL11.glColor4f(1, 1, 1, 0.75f);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
@@ -10,16 +10,16 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.render.ColorUtil;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
import com.enderio.core.common.network.MessageTileNBT;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.api.teleport.ITravelAccessable;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiTravelAuth extends GuiContainerBase {
|
||||
public class GuiTravelAuth extends GuiContainerBaseEIO {
|
||||
|
||||
private final String title;
|
||||
private final ITravelAccessable ta;
|
||||
@@ -28,7 +28,7 @@ public class GuiTravelAuth extends GuiContainerBase {
|
||||
private final EntityPlayer player;
|
||||
|
||||
public GuiTravelAuth(EntityPlayer player, ITravelAccessable te, World world) {
|
||||
super(new ContainerTravelAuth(player.inventory));
|
||||
super(new ContainerTravelAuth(player.inventory), "travelAuth");
|
||||
this.ta = te;
|
||||
title = EnderIO.lang.localize("gui.travelAccessable.enterCode");
|
||||
this.player = player;
|
||||
@@ -76,7 +76,7 @@ public class GuiTravelAuth extends GuiContainerBase {
|
||||
@Override
|
||||
public void drawGuiContainerBackgroundLayer(float f, int mx, int my) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/travelAuth.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
@@ -13,7 +13,6 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.widget.GuiToolTip;
|
||||
import com.enderio.core.client.gui.widget.TextFieldEnder;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
@@ -24,11 +23,12 @@ import com.google.common.collect.Lists;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.GuiHandler;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class GuiTelePad extends GuiContainerBase implements IToggleableGui {
|
||||
public class GuiTelePad extends GuiContainerBaseEIO implements IToggleableGui {
|
||||
|
||||
private static final int ID_SWITCH_BUTTON = 95;
|
||||
private static final int ID_TELEPORT_BUTTON = 96;
|
||||
@@ -52,7 +52,7 @@ public class GuiTelePad extends GuiContainerBase implements IToggleableGui {
|
||||
public static int SWITCH_X = 155, SWITCH_Y = 5;
|
||||
|
||||
public GuiTelePad(InventoryPlayer playerInv, TileTelePad te, World world) {
|
||||
super(new ContainerTelePad(playerInv));
|
||||
super(new ContainerTelePad(playerInv), "telePad");
|
||||
this.world = world;
|
||||
this.te = te;
|
||||
ySize += 34;
|
||||
@@ -161,7 +161,7 @@ public class GuiTelePad extends GuiContainerBase implements IToggleableGui {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/telePad.png");
|
||||
bindGuiTexture();
|
||||
int sx = (width - xSize) / 2;
|
||||
int sy = (height - ySize) / 2;
|
||||
|
||||
|
||||
Reference in new issue
Block a user