Moving the handling of progress to GuiProgressBar
Adds an interface providing data for GuiProgressBar Changed all containers simulating progress to implement the interface
This commit is contained in:
@@ -21,7 +21,7 @@ public class GuiMAC extends GuiUpgradeable
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
|
||||
pb = new GuiProgressBar( container, "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( pb );
|
||||
}
|
||||
|
||||
@@ -36,10 +36,7 @@ public class GuiMAC extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
pb.max = 100;
|
||||
pb.current = container.craftProgress;
|
||||
pb.FullMsg = pb.current + "%";
|
||||
|
||||
pb.setFullMsg( container.getCurrentProgress() + "%" );
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
}
|
||||
|
||||
@@ -56,7 +53,8 @@ public class GuiMAC extends GuiUpgradeable
|
||||
return "guis/mac.png";
|
||||
}
|
||||
|
||||
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) {
|
||||
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te)
|
||||
{
|
||||
super( new ContainerMAC( inventoryPlayer, te ) );
|
||||
this.ySize = 197;
|
||||
this.container = (ContainerMAC) this.inventorySlots;
|
||||
|
||||
Reference in New Issue
Block a user