initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
46
java/src/game/gui/GuiDispenser.java
Executable file
46
java/src/game/gui/GuiDispenser.java
Executable file
|
@ -0,0 +1,46 @@
|
|||
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);
|
||||
// }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue