From 1b5ec52a0d1e2b02515bece772531a714804be49 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Wed, 1 Jan 2014 20:06:23 -0500 Subject: [PATCH] Changed prefab GUIs to allow custom textures --- .../builtbroken/minecraft/prefab/invgui/GuiMachineBase.java | 2 +- .../minecraft/prefab/invgui/GuiMachineContainer.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineBase.java b/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineBase.java index 5c7a2891..e708a0a7 100644 --- a/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineBase.java +++ b/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineBase.java @@ -20,7 +20,7 @@ import cpw.mods.fml.client.FMLClientHandler; public class GuiMachineBase extends GuiBase { - public static final ResourceLocation TEXTURE = new ResourceLocation(DarkCore.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_grey.png"); + public ResourceLocation TEXTURE = new ResourceLocation(DarkCore.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_grey.png"); protected static final int MAX_BUTTON_ID = 3; protected TileEntityMachine tileEntity; diff --git a/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineContainer.java b/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineContainer.java index 85eea209..ffddbb00 100644 --- a/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineContainer.java +++ b/src/com/builtbroken/minecraft/prefab/invgui/GuiMachineContainer.java @@ -7,10 +7,12 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.prefab.TileEntityMachine; import com.builtbroken.minecraft.prefab.invgui.GuiButtonImage.ButtonIcon; @@ -29,6 +31,8 @@ public abstract class GuiMachineContainer extends GuiContainer protected ButtonIcon guiIcon = ButtonIcon.CHEST, guiIcon2 = ButtonIcon.PERSON, guiIcon3 = ButtonIcon.BLANK; protected String invName = "Home", invName2 = "2", invName3 = "3"; + public ResourceLocation TEXTURE = new ResourceLocation(DarkCore.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_grey.png"); + protected int containerWidth; protected int containerHeight; @@ -110,7 +114,7 @@ public abstract class GuiMachineContainer extends GuiContainer @Override protected void drawGuiContainerBackgroundLayer(float par1, int x, int y) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(GuiMachineBase.TEXTURE); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);