GT5-Unofficial/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java

30 lines
1,008 B
Java
Raw Normal View History

2015-04-23 16:14:22 +00:00
package gregtech.api.gui;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.InventoryPlayer;
2015-10-22 02:06:25 +00:00
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
2015-04-23 16:14:22 +00:00
public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine {
2015-10-22 02:06:25 +00:00
private final String mName;
2015-04-23 16:14:22 +00:00
public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
super(new GT_Container_4by4(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "4by4.png");
mName = aName;
}
2015-10-22 02:06:25 +00:00
2015-04-23 16:14:22 +00:00
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
2015-10-22 02:06:25 +00:00
fontRendererObj.drawString(mName, 8, 4, 4210752);
2015-04-23 16:14:22 +00:00
}
2015-10-22 02:06:25 +00:00
2015-04-23 16:14:22 +00:00
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
2015-10-22 02:06:25 +00:00
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
2015-04-23 16:14:22 +00:00
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
}
}