2014-04-24 08:14:26 +02:00
|
|
|
package appeng.client.gui.implementations;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
2014-05-07 04:21:12 +02:00
|
|
|
import appeng.api.config.RedstoneMode;
|
|
|
|
import appeng.api.config.Settings;
|
|
|
|
import appeng.client.gui.widgets.GuiImgButton;
|
2014-05-09 06:09:42 +02:00
|
|
|
import appeng.client.gui.widgets.GuiProgressBar;
|
|
|
|
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
2014-04-24 08:14:26 +02:00
|
|
|
import appeng.container.implementations.ContainerMAC;
|
|
|
|
import appeng.core.localization.GuiText;
|
|
|
|
import appeng.tile.crafting.TileMolecularAssembler;
|
|
|
|
|
2014-05-07 04:21:12 +02:00
|
|
|
public class GuiMAC extends GuiUpgradeable
|
2014-04-24 08:14:26 +02:00
|
|
|
{
|
|
|
|
|
2014-05-09 06:09:42 +02:00
|
|
|
ContainerMAC cmac;
|
|
|
|
GuiProgressBar pb;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void initGui()
|
|
|
|
{
|
|
|
|
super.initGui();
|
|
|
|
|
|
|
|
pb = new GuiProgressBar( "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
|
|
|
|
this.buttonList.add( pb );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
|
|
|
{
|
|
|
|
pb.xPosition = 148 + guiLeft;
|
|
|
|
pb.yPosition = 48 + guiTop;
|
|
|
|
super.drawBG( offsetX, offsetY, mouseX, mouseY );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
|
|
|
{
|
|
|
|
pb.max = 100;
|
|
|
|
pb.current = cmac.craftProgress;
|
|
|
|
pb.FullMsg = pb.current + "%";
|
|
|
|
|
|
|
|
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
|
|
|
}
|
|
|
|
|
2014-05-07 04:21:12 +02:00
|
|
|
@Override
|
|
|
|
protected void addButtons()
|
|
|
|
{
|
|
|
|
redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
|
|
|
buttonList.add( redstoneMode );
|
|
|
|
}
|
|
|
|
|
|
|
|
protected String getBackground()
|
|
|
|
{
|
|
|
|
return "guis/mac.png";
|
|
|
|
}
|
|
|
|
|
2014-04-24 08:14:26 +02:00
|
|
|
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) {
|
|
|
|
super( new ContainerMAC( inventoryPlayer, te ) );
|
|
|
|
this.ySize = 197;
|
2014-05-09 06:09:42 +02:00
|
|
|
this.cmac = (ContainerMAC) this.inventorySlots;
|
2014-04-24 08:14:26 +02:00
|
|
|
}
|
|
|
|
|
2014-05-07 04:21:12 +02:00
|
|
|
protected GuiText getName()
|
2014-04-24 08:14:26 +02:00
|
|
|
{
|
2014-05-07 04:21:12 +02:00
|
|
|
return GuiText.MolecularAssembler;
|
2014-04-24 08:14:26 +02:00
|
|
|
}
|
|
|
|
}
|