Basic reformat, hit once, hope never again
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
@@ -28,13 +29,14 @@ import appeng.container.implementations.ContainerUpgradeable;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
|
||||
|
||||
public class GuiInscriber extends AEBaseGui
|
||||
{
|
||||
|
||||
final ContainerInscriber cvc;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiInscriber(InventoryPlayer inventoryPlayer, TileInscriber te)
|
||||
public GuiInscriber( InventoryPlayer inventoryPlayer, TileInscriber te )
|
||||
{
|
||||
super( new ContainerInscriber( inventoryPlayer, te ) );
|
||||
this.cvc = (ContainerInscriber) this.inventorySlots;
|
||||
@@ -42,32 +44,22 @@ public class GuiInscriber extends AEBaseGui
|
||||
this.xSize = this.hasToolbox() ? 246 : 211;
|
||||
}
|
||||
|
||||
protected boolean hasToolbox()
|
||||
{
|
||||
return ( (ContainerUpgradeable) this.inventorySlots ).hasToolbox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
this.pb = new GuiProgressBar( this.cvc, "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL );
|
||||
this.pb = new GuiProgressBar( this.cvc, "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( this.pb );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
this.bindTexture( "guis/inscriber.png" );
|
||||
this.pb.xPosition = 135 + this.guiLeft;
|
||||
this.pb.yPosition = 39 + this.guiTop;
|
||||
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||
|
||||
if ( this.drawUpgrades() )
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvc.availableUpgrades() * 18 );
|
||||
if ( this.hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
{
|
||||
this.pb.setFullMsg( this.cvc.getCurrentProgress() * 100 / this.cvc.getMaxProgress() + "%" );
|
||||
|
||||
@@ -75,14 +67,23 @@ public class GuiInscriber extends AEBaseGui
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/inscriber.png" );
|
||||
this.pb.xPosition = 135 + this.guiLeft;
|
||||
this.pb.yPosition = 39 + this.guiTop;
|
||||
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||
|
||||
if( this.drawUpgrades() )
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvc.availableUpgrades() * 18 );
|
||||
if( this.hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||
}
|
||||
|
||||
protected boolean drawUpgrades()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean hasToolbox()
|
||||
{
|
||||
return ((ContainerUpgradeable) this.inventorySlots).hasToolbox();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user