Changed prefab GUIs to allow custom textures

This commit is contained in:
DarkGuardsman 2014-01-01 20:06:23 -05:00
parent 11866075c5
commit 1b5ec52a0d
2 changed files with 6 additions and 2 deletions

View file

@ -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;

View file

@ -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);