46 lines
1.5 KiB
Java
Executable file
46 lines
1.5 KiB
Java
Executable file
package game.gui;
|
|
|
|
import game.inventory.ContainerDispenser;
|
|
import game.inventory.IInventory;
|
|
import game.inventory.InventoryPlayer;
|
|
|
|
|
|
public class GuiDispenser extends GuiContainer
|
|
{
|
|
// private static final String dispenserGuiTextures = "textures/gui/dispenser.png";
|
|
|
|
/** The player inventory bound to this GUI. */
|
|
private final InventoryPlayer playerInventory;
|
|
|
|
/** The inventory contained within the corresponding Dispenser. */
|
|
public IInventory dispenserInventory;
|
|
|
|
public GuiDispenser(InventoryPlayer playerInv, IInventory dispenserInv)
|
|
{
|
|
super(new ContainerDispenser(playerInv, dispenserInv));
|
|
this.playerInventory = playerInv;
|
|
this.dispenserInventory = dispenserInv;
|
|
}
|
|
|
|
/**
|
|
* Draw the foreground layer for the GuiContainer (everything in front of the items). Args : mouseX, mouseY
|
|
*/
|
|
public void drawGuiContainerForegroundLayer()
|
|
{
|
|
String s = this.dispenserInventory.getCommandName();
|
|
this.drawString(s, 8, 6);
|
|
this.drawString(this.playerInventory.getCommandName(), 8, this.ySize - 96 + 2);
|
|
}
|
|
|
|
// /**
|
|
// * Args : renderPartialTicks, mouseX, mouseY
|
|
// */
|
|
// protected void drawGuiContainerBackgroundLayer(int mouseX, int mouseY)
|
|
// {
|
|
// GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
|
// this.gm.getTextureManager().bindTexture(dispenserGuiTextures);
|
|
// int i = (this.width - this.xSize) / 2;
|
|
// int j = (this.height - this.ySize) / 2;
|
|
//// this.rect(i, j, 0, 0, this.xSize, this.ySize);
|
|
// }
|
|
}
|