Work on GUIs (specifically to get SkyChest GUI)

This commit is contained in:
Sebastian Hartte
2020-06-02 02:14:09 +02:00
parent 271e8889a1
commit 9f63859769
109 changed files with 1133 additions and 1301 deletions
@@ -69,10 +69,10 @@ public class GuiCellWorkbench extends GuiUpgradeable
.getLocal() );
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
this.buttonList.add( this.fuzzyMode );
this.buttonList.add( this.partition );
this.buttonList.add( this.clear );
this.buttonList.add( this.copyMode );
this.addButton( this.fuzzyMode );
this.addButton( this.partition );
this.addButton( this.clear );
this.addButton( this.copyMode );
}
@Override
@@ -57,18 +57,18 @@ public class GuiChest extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.addButton( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.Chest.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.Chest.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -66,24 +66,24 @@ public class GuiCondenser extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.pb = new GuiProgressBar( this.cvc, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop, 178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy
.getLocal() );
this.mode = new GuiImgButton( 128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT, this.cvc.getOutput() );
this.buttonList.add( this.pb );
this.buttonList.add( this.mode );
this.addButton( this.pb );
this.addButton( this.mode );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.mode.set( this.cvc.getOutput() );
this.mode.setFillVar( String.valueOf( this.cvc.getOutput().requiredPower ) );
@@ -25,7 +25,6 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.IParts;
import appeng.api.storage.ITerminalHost;
@@ -72,26 +71,26 @@ public class GuiCraftAmount extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
final int a = AEConfig.instance().craftItemsByStackAmounts( 0 );
final int b = AEConfig.instance().craftItemsByStackAmounts( 1 );
final int c = AEConfig.instance().craftItemsByStackAmounts( 2 );
final int d = AEConfig.instance().craftItemsByStackAmounts( 3 );
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 26, 22, 20, "+" + a ) );
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 26, 28, 20, "+" + b ) );
this.buttonList.add( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 26, 32, 20, "+" + c ) );
this.buttonList.add( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 26, 38, 20, "+" + d ) );
this.addButton( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 26, 22, 20, "+" + a ) );
this.addButton( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 26, 28, 20, "+" + b ) );
this.addButton( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 26, 32, 20, "+" + c ) );
this.addButton( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 26, 38, 20, "+" + d ) );
this.buttonList.add( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 75, 22, 20, "-" + a ) );
this.buttonList.add( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 75, 28, 20, "-" + b ) );
this.buttonList.add( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 75, 32, 20, "-" + c ) );
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 75, 38, 20, "-" + d ) );
this.addButton( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 75, 22, 20, "-" + a ) );
this.addButton( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 75, 28, 20, "-" + b ) );
this.addButton( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 75, 32, 20, "-" + c ) );
this.addButton( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 75, 38, 20, "-" + d ) );
this.buttonList.add( this.next = new GuiButton( 0, this.guiLeft + 128, this.guiTop + 51, 38, 20, GuiText.Next.getLocal() ) );
this.addButton( this.next = new GuiButton( 0, this.guiLeft + 128, this.guiTop + 51, 38, 20, GuiText.Next.getLocal() ) );
ItemStack myIcon = null;
final Object target = ( (AEBaseContainer) this.inventorySlots ).getTarget();
@@ -125,10 +124,10 @@ public class GuiCraftAmount extends AEBaseGui
if( this.originalGui != null && !myIcon.isEmpty() )
{
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), this.itemRender ) );
this.addButton( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), this.itemRender ) );
}
this.amountToCraft = new GuiNumberBox( this.fontRenderer, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRenderer.FONT_HEIGHT, Integer.class );
this.amountToCraft = new GuiNumberBox( this.font, this.guiLeft + 62, this.guiTop + 57, 59, this.font.FONT_HEIGHT, Integer.class );
this.amountToCraft.setEnableBackgroundDrawing( false );
this.amountToCraft.setMaxStringLength( 16 );
this.amountToCraft.setTextColor( 0xFFFFFF );
@@ -140,13 +139,13 @@ public class GuiCraftAmount extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( GuiText.SelectAmount.getLocal(), 8, 6, 4210752 );
this.font.drawString( GuiText.SelectAmount.getLocal(), 8, 6, 4210752 );
}
@Override
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.next.displayString = isShiftKeyDown() ? GuiText.Start.getLocal() : GuiText.Next.getLocal();
this.next.displayString = hasShiftDown() ? GuiText.Start.getLocal() : GuiText.Next.getLocal();
this.bindTexture( "guis/craft_amt.png" );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
@@ -230,7 +229,7 @@ public class GuiCraftAmount extends AEBaseGui
if( btn == this.next )
{
NetworkHandler.instance().sendToServer( new PacketCraftRequest( Integer.parseInt( this.amountToCraft.getText() ), isShiftKeyDown() ) );
NetworkHandler.instance().sendToServer( new PacketCraftRequest( Integer.parseInt( this.amountToCraft.getText() ), hasShiftDown() ) );
}
}
catch( final NumberFormatException e )
@@ -34,7 +34,6 @@ import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
@@ -112,29 +111,29 @@ public class GuiCraftConfirm extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.start = new GuiButton( 0, this.guiLeft + 162, this.guiTop + this.ySize - 25, 50, 20, GuiText.Start.getLocal() );
this.start.enabled = false;
this.buttonList.add( this.start );
this.addButton( this.start );
this.selectCPU = new GuiButton( 0, this.guiLeft + ( 219 - 180 ) / 2, this.guiTop + this.ySize - 68, 180, 20, GuiText.CraftingCPU
.getLocal() + ": " + GuiText.Automatic );
this.selectCPU.enabled = false;
this.buttonList.add( this.selectCPU );
this.addButton( this.selectCPU );
if( this.OriginalGui != null )
{
this.cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
}
this.buttonList.add( this.cancel );
this.addButton( this.cancel );
}
@Override
public void drawScreen( final int mouseX, final int mouseY, final float btn )
public void render(final int mouseX, final int mouseY, final float btn )
{
this.updateCPUButtonText();
@@ -172,7 +171,7 @@ public class GuiCraftConfirm extends AEBaseGui
}
}
super.drawScreen( mouseX, mouseY, btn );
super.render( mouseX, mouseY, btn );
}
private void updateCPUButtonText()
@@ -210,7 +209,7 @@ public class GuiCraftConfirm extends AEBaseGui
final long BytesUsed = this.ccc.getUsedBytes();
final String byteUsed = NumberFormat.getInstance().format( BytesUsed );
final String Add = BytesUsed > 0 ? ( byteUsed + ' ' + GuiText.BytesUsed.getLocal() ) : GuiText.CalculatingWait.getLocal();
this.fontRenderer.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 );
this.font.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 );
String dsp = null;
@@ -224,8 +223,8 @@ public class GuiCraftConfirm extends AEBaseGui
.getLocal() + ": " + this.ccc.getCpuCoProcessors() ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
}
final int offset = ( 219 - this.fontRenderer.getStringWidth( dsp ) ) / 2;
this.fontRenderer.drawString( dsp, offset, 165, 4210752 );
final int offset = ( 219 - this.font.getStringWidth( dsp ) ) / 2;
this.font.drawString( dsp, offset, 165, 4210752 );
final int sectionLength = 67;
@@ -286,8 +285,8 @@ public class GuiCraftConfirm extends AEBaseGui
}
str = GuiText.FromStorage.getLocal() + ": " + str;
final int w = 4 + this.fontRenderer.getStringWidth( str );
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
final int w = 4 + this.font.getStringWidth( str );
this.font.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart )
@@ -312,8 +311,8 @@ public class GuiCraftConfirm extends AEBaseGui
}
str = GuiText.Missing.getLocal() + ": " + str;
final int w = 4 + this.fontRenderer.getStringWidth( str );
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
final int w = 4 + this.font.getStringWidth( str );
this.font.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart )
@@ -338,8 +337,8 @@ public class GuiCraftConfirm extends AEBaseGui
}
str = GuiText.ToCraft.getLocal() + ": " + str;
final int w = 4 + this.fontRenderer.getStringWidth( str );
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
final int w = 4 + this.font.getStringWidth( str );
this.font.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart )
@@ -373,7 +372,7 @@ public class GuiCraftConfirm extends AEBaseGui
{
final int startX = x * ( 1 + sectionLength ) + xo;
final int startY = posY - 4;
drawRect( startX, startY, startX + sectionLength, startY + offY, 0x1AFF0000 );
fill( startX, startY, startX + sectionLength, startY + offY, 0x1AFF0000 );
}
x++;
@@ -34,7 +34,6 @@ import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.config.SortDir;
import appeng.api.config.SortOrder;
import appeng.api.config.ViewItems;
@@ -135,13 +134,13 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.setScrollBar();
this.cancel = new GuiButton( 0, this.guiLeft + CANCEL_LEFT_OFFSET, this.guiTop + this.ySize - CANCEL_TOP_OFFSET, CANCEL_WIDTH, CANCEL_HEIGHT, GuiText.Cancel
.getLocal() );
this.buttonList.add( this.cancel );
this.addButton( this.cancel );
}
private void setScrollBar()
@@ -153,7 +152,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
@Override
public void drawScreen( final int mouseX, final int mouseY, final float btn )
public void render(final int mouseX, final int mouseY, final float btn )
{
this.cancel.enabled = !this.visual.isEmpty();
@@ -188,7 +187,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
}
super.drawScreen( mouseX, mouseY, btn );
super.render( mouseX, mouseY, btn );
}
@Override
@@ -203,7 +202,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
title += " - " + etaTimeText;
}
this.fontRenderer.drawString( title, TITLE_LEFT_OFFSET, TITLE_TOP_OFFSET, TEXT_COLOR );
this.font.drawString( title, TITLE_LEFT_OFFSET, TITLE_TOP_OFFSET, TEXT_COLOR );
int x = 0;
int y = 0;
@@ -254,7 +253,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
final int bgColor = ( active ? AEColor.GREEN.blackVariant : AEColor.YELLOW.blackVariant ) | BACKGROUND_ALPHA;
final int startX = ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET ) * 2;
final int startY = ( ( y * offY + ITEMSTACK_TOP_OFFSET ) - 3 ) * 2;
drawRect( startX, startY, startX + ( SECTION_LENGTH * 2 ), startY + ( offY * 2 ) - 2, bgColor );
fill( startX, startY, startX + ( SECTION_LENGTH * 2 ), startY + ( offY * 2 ) - 2, bgColor );
}
final int negY = ( ( lines - 1 ) * 5 ) / 2;
@@ -263,8 +262,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( stored != null && stored.getStackSize() > 0 )
{
final String str = GuiText.Stored.getLocal() + ": " + converter.toWideReadableForm( stored.getStackSize() );
final int w = 4 + this.fontRenderer.getStringWidth( str );
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
final int w = 4 + this.font.getStringWidth( str );
this.font.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
if( this.tooltip == z - viewStart )
@@ -278,9 +277,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( activeStack != null && activeStack.getStackSize() > 0 )
{
final String str = GuiText.Crafting.getLocal() + ": " + converter.toWideReadableForm( activeStack.getStackSize() );
final int w = 4 + this.fontRenderer.getStringWidth( str );
final int w = 4 + this.font.getStringWidth( str );
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
this.font.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
if( this.tooltip == z - viewStart )
@@ -294,9 +293,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( pendingStack != null && pendingStack.getStackSize() > 0 )
{
final String str = GuiText.Scheduled.getLocal() + ": " + converter.toWideReadableForm( pendingStack.getStackSize() );
final int w = 4 + this.fontRenderer.getStringWidth( str );
final int w = 4 + this.font.getStringWidth( str );
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
this.font.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
if( this.tooltip == z - viewStart )
@@ -31,7 +31,6 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.IParts;
import appeng.api.storage.ITerminalHost;
@@ -123,28 +122,28 @@ public class GuiCraftingStatus extends GuiCraftingCPU
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + this.ySize - 25, 150, 20, GuiText.CraftingCPU
.getLocal() + ": " + GuiText.NoCraftingCPUs );
// selectCPU.enabled = false;
this.buttonList.add( this.selectCPU );
this.addButton( this.selectCPU );
if( !this.myIcon.isEmpty() )
{
this.buttonList.add(
this.addButton(
this.originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, this.myIcon, this.myIcon.getDisplayName(), this.itemRender ) );
this.originalGuiBtn.setHideEdge( 13 );
}
}
@Override
public void drawScreen( final int mouseX, final int mouseY, final float btn )
public void render(final int mouseX, final int mouseY, final float btn )
{
this.updateCPUButtonText();
super.drawScreen( mouseX, mouseY, btn );
super.render( mouseX, mouseY, btn );
}
private void updateCPUButtonText()
@@ -73,10 +73,10 @@ public class GuiCraftingTerm extends GuiMEMonitorable
}
@Override
public void initGui()
public void init()
{
super.initGui();
this.buttonList.add( this.clearBtn = new GuiImgButton( this.guiLeft + 92, this.guiTop + this.ySize - 156, Settings.ACTIONS, ActionItems.STASH ) );
super.init();
this.addButton( this.clearBtn = new GuiImgButton( this.guiLeft + 92, this.guiTop + this.ySize - 156, Settings.ACTIONS, ActionItems.STASH ) );
this.clearBtn.setHalfSize( true );
}
@@ -84,7 +84,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRenderer.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.getReservedSpace(), 4210752 );
this.font.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.getReservedSpace(), 4210752 );
}
@Override
@@ -57,18 +57,18 @@ public class GuiDrive extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.addButton( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.Drive.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.Drive.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -58,17 +58,17 @@ public class GuiFormationPlane extends GuiUpgradeable
this.placeMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.PLACE_BLOCK, YesNo.YES );
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.addButton( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.buttonList.add( this.placeMode );
this.buttonList.add( this.fuzzyMode );
this.addButton( this.placeMode );
this.addButton( this.fuzzyMode );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
if( this.fuzzyMode != null )
{
@@ -39,8 +39,8 @@ public class GuiGrinder extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.GrindStone.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.GrindStone.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -59,16 +59,16 @@ public class GuiIOPort extends GuiUpgradeable
this.fullMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.FULLNESS_MODE, FullnessMode.EMPTY );
this.operationMode = new GuiImgButton( this.guiLeft + 80, this.guiTop + 17, Settings.OPERATION_MODE, OperationMode.EMPTY );
this.buttonList.add( this.operationMode );
this.buttonList.add( this.redstoneMode );
this.buttonList.add( this.fullMode );
this.addButton( this.operationMode );
this.addButton( this.redstoneMode );
this.addButton( this.fullMode );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.IOPort.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.IOPort.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
if( this.redstoneMode != null )
{
@@ -50,12 +50,12 @@ public class GuiInscriber extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.pb = new GuiProgressBar( this.cvc, "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL );
this.buttonList.add( this.pb );
this.addButton( this.pb );
}
@Override
@@ -63,8 +63,8 @@ public class GuiInscriber extends AEBaseGui
{
this.pb.setFullMsg( this.cvc.getCurrentProgress() * 100 / this.cvc.getMaxProgress() + "%" );
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.Inscriber.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.Inscriber.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -57,14 +57,14 @@ public class GuiInterface extends GuiUpgradeable
protected void addButtons()
{
this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender );
this.buttonList.add( this.priority );
this.addButton( this.priority );
this.BlockMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK, YesNo.NO );
this.buttonList.add( this.BlockMode );
this.addButton( this.BlockMode );
this.interfaceMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 26, 84, 85, GuiText.InterfaceTerminal
.getLocal(), GuiText.InterfaceTerminalHint.getLocal() );
this.buttonList.add( this.interfaceMode );
this.addButton( this.interfaceMode );
}
@Override
@@ -80,13 +80,13 @@ public class GuiInterface extends GuiUpgradeable
this.interfaceMode.setState( ( (ContainerInterface) this.cvb ).getInterfaceTerminalMode() == YesNo.YES );
}
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.Config.getLocal(), 8, 6 + 11 + 7, 4210752 );
this.fontRenderer.drawString( GuiText.StoredItems.getLocal(), 8, 6 + 60 + 7, 4210752 );
this.fontRenderer.drawString( GuiText.Patterns.getLocal(), 8, 6 + 73 + 7, 4210752 );
this.font.drawString( GuiText.Config.getLocal(), 8, 6 + 11 + 7, 4210752 );
this.font.drawString( GuiText.StoredItems.getLocal(), 8, 6 + 60 + 7, 4210752 );
this.font.drawString( GuiText.Patterns.getLocal(), 8, 6 + 73 + 7, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -36,9 +36,8 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.ListNBT;
import appeng.api.AEApi;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.widgets.GuiScrollbar;
@@ -80,15 +79,15 @@ public class GuiInterfaceTerminal extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.getScrollBar().setLeft( 175 );
this.getScrollBar().setHeight( 106 );
this.getScrollBar().setTop( 18 );
this.searchField = new MEGuiTextField( this.fontRenderer, this.guiLeft + Math.max( 104, this.offsetX ), this.guiTop + 4, 65, 12 );
this.searchField = new MEGuiTextField( this.font, this.guiLeft + Math.max( 104, this.offsetX ), this.guiTop + 4, 65, 12 );
this.searchField.setEnableBackgroundDrawing( false );
this.searchField.setMaxStringLength( 25 );
this.searchField.setTextColor( 0xFFFFFF );
@@ -99,8 +98,8 @@ public class GuiInterfaceTerminal extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
final int ex = this.getScrollBar().getCurrentScroll();
@@ -134,12 +133,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
name = name + " (" + rows + ')';
}
while( name.length() > 2 && this.fontRenderer.getStringWidth( name ) > 155 )
while( name.length() > 2 && this.font.getStringWidth( name ) > 155 )
{
name = name.substring( 0, name.length() - 1 );
}
this.fontRenderer.drawString( name, 10, 6 + offset, 4210752 );
this.font.drawString( name, 10, 6 + offset, 4210752 );
}
offset += 18;
}
@@ -175,7 +174,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
{
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
GlStateManager.color( 1, 1, 1, 1 );
RenderSystem.color4f( 1, 1, 1, 1 );
final int width = inv.getInventory().getSlots() * 18;
this.drawTexturedModalRect( offsetX + 7, offsetY + offset, 7, 139, width, 18 );
}
@@ -339,8 +338,8 @@ public class GuiInterfaceTerminal extends AEBaseGui
}
// Potential later use to filter by input
// NBTTagList inTag = encodedValue.getTagList( "in", 10 );
final NBTTagList outTag = encodedValue.getTagList( "out", 10 );
// ListNBT inTag = encodedValue.getTagList( "in", 10 );
final ListNBT outTag = encodedValue.getTagList( "out", 10 );
for( int i = 0; i < outTag.tagCount(); i++ )
{
@@ -67,11 +67,11 @@ public class GuiLevelEmitter extends GuiUpgradeable
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.level = new GuiNumberBox( this.fontRenderer, this.guiLeft + 24, this.guiTop + 43, 79, this.fontRenderer.FONT_HEIGHT, Long.class );
this.level = new GuiNumberBox( this.font, this.guiLeft + 24, this.guiTop + 43, 79, this.font.FONT_HEIGHT, Long.class );
this.level.setEnableBackgroundDrawing( false );
this.level.setMaxStringLength( 16 );
this.level.setTextColor( 0xFFFFFF );
@@ -93,20 +93,20 @@ public class GuiLevelEmitter extends GuiUpgradeable
final int c = AEConfig.instance().levelByStackAmounts( 2 );
final int d = AEConfig.instance().levelByStackAmounts( 3 );
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+" + a ) );
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 17, 28, 20, "+" + b ) );
this.buttonList.add( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 17, 32, 20, "+" + c ) );
this.buttonList.add( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 17, 38, 20, "+" + d ) );
this.addButton( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+" + a ) );
this.addButton( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 17, 28, 20, "+" + b ) );
this.addButton( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 17, 32, 20, "+" + c ) );
this.addButton( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 17, 38, 20, "+" + d ) );
this.buttonList.add( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 59, 22, 20, "-" + a ) );
this.buttonList.add( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 59, 28, 20, "-" + b ) );
this.buttonList.add( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 59, 32, 20, "-" + c ) );
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 59, 38, 20, "-" + d ) );
this.addButton( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 59, 22, 20, "-" + a ) );
this.addButton( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 59, 28, 20, "-" + b ) );
this.addButton( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 59, 32, 20, "-" + c ) );
this.addButton( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 59, 38, 20, "-" + d ) );
this.buttonList.add( this.levelMode );
this.buttonList.add( this.redstoneMode );
this.buttonList.add( this.fuzzyMode );
this.buttonList.add( this.craftingMode );
this.addButton( this.levelMode );
this.addButton( this.redstoneMode );
this.addButton( this.fuzzyMode );
this.addButton( this.craftingMode );
}
@Override
@@ -45,19 +45,19 @@ public class GuiMAC extends GuiUpgradeable
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.pb = new GuiProgressBar( this.container, "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
this.buttonList.add( this.pb );
this.addButton( this.pb );
}
@Override
protected void addButtons()
{
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
this.buttonList.add( this.redstoneMode );
this.addButton( this.redstoneMode );
}
@Override
@@ -219,12 +219,12 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
private void reinitalize()
{
this.buttonList.clear();
this.initGui();
this.buttons.clear();
this.init();
}
@Override
public void initGui()
public void init()
{
Keyboard.enableRepeatEvents( true );
@@ -266,7 +266,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.xSize = this.standardSize;
}
super.initGui();
super.init();
// full size : 204
// extra slots : 72
// slot 18
@@ -292,11 +292,11 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
offset += 20;
}
this.buttonList.add( this.SortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, this.configSrc
this.addButton( this.SortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, this.configSrc
.getSetting( Settings.SORT_DIRECTION ) ) );
offset += 20;
this.buttonList.add(
this.addButton(
this.searchBoxSettings = new GuiImgButton( this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance()
.getConfigManager()
.getSetting(
@@ -306,12 +306,12 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( !( this instanceof GuiMEPortableCell ) || this instanceof GuiWirelessTerm )
{
this.buttonList.add( this.terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance()
this.addButton( this.terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance()
.getConfigManager()
.getSetting( Settings.TERMINAL_STYLE ) ) );
}
this.searchField = new MEGuiTextField( this.fontRenderer, this.guiLeft + Math.max( 80, this.offsetX ), this.guiTop + 4, 90, 12 );
this.searchField = new MEGuiTextField( this.font, this.guiLeft + Math.max( 80, this.offsetX ), this.guiTop + 4, 90, 12 );
this.searchField.setEnableBackgroundDrawing( false );
this.searchField.setMaxStringLength( 25 );
this.searchField.setTextColor( 0xFFFFFF );
@@ -320,7 +320,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( this.viewCell || this instanceof GuiWirelessTerm )
{
this.buttonList.add( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus
this.addButton( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus
.getLocal(), this.itemRender ) );
this.craftingStatusBtn.setHideEdge( 13 );
}
@@ -379,8 +379,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( this.myName.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( this.myName.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.currentMouseX = mouseX;
this.currentMouseY = mouseY;
@@ -403,9 +403,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
}
@Override
public void onGuiClosed()
public void removed()
{
super.onGuiClosed();
super.removed();
Keyboard.enableRepeatEvents( false );
memoryText = this.searchField.getText();
}
@@ -84,16 +84,16 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.units = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.POWER_UNITS, AEConfig.instance().selectedPowerUnit() );
this.buttonList.add( this.units );
this.addButton( this.units );
}
@Override
public void drawScreen( final int mouseX, final int mouseY, final float btn )
public void render(final int mouseX, final int mouseY, final float btn )
{
final int gx = ( this.width - this.xSize ) / 2;
@@ -126,7 +126,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
}
super.drawScreen( mouseX, mouseY, btn );
super.render( mouseX, mouseY, btn );
}
@Override
@@ -134,14 +134,14 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
{
final ContainerNetworkStatus ns = (ContainerNetworkStatus) this.inventorySlots;
this.fontRenderer.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
this.font.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( ns.getCurrentPower(), false ), 13, 16, 4210752 );
this.fontRenderer.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( ns.getMaxPower(), false ), 13, 26, 4210752 );
this.font.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( ns.getCurrentPower(), false ), 13, 16, 4210752 );
this.font.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( ns.getMaxPower(), false ), 13, 26, 4210752 );
this.fontRenderer.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.getAverageAddition(), true ), 13, 143 - 10,
this.font.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.getAverageAddition(), true ), 13, 143 - 10,
4210752 );
this.fontRenderer.drawString( GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( ns.getPowerUsage(), true ), 13, 143 - 20, 4210752 );
this.font.drawString( GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( ns.getPowerUsage(), true ), 13, 143 - 20, 4210752 );
final int sectionLength = 30;
@@ -170,8 +170,8 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
str = Long.toString( refStack.getStackSize() / 1000 ) + 'k';
}
final int w = this.fontRenderer.getStringWidth( str );
this.fontRenderer.drawString( str, (int) ( ( x * sectionLength + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * 18 + yo + 6 ) * 2,
final int w = this.font.getStringWidth( str );
this.font.drawString( str, (int) ( ( x * sectionLength + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * 18 + yo + 6 ) * 2,
4210752 );
GlStateManager.popMatrix();
@@ -257,8 +257,8 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
if( myStack != null )
{
ITooltipFlag.TooltipFlags tooltipFlag = this.mc.gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL;
List<String> currentToolTip = stack.getTooltip( this.mc.player, tooltipFlag );
ITooltipFlag.TooltipFlags tooltipFlag = this.minecraft.gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL;
List<String> currentToolTip = stack.getTooltip( this.minecraft.player, tooltipFlag );
while( currentToolTip.size() > 1 )
{
@@ -64,14 +64,14 @@ public class GuiNetworkTool extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.tFacades = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 8, 23, 22, GuiText.TransparentFacades.getLocal(), GuiText.TransparentFacadesHint
.getLocal() );
this.buttonList.add( this.tFacades );
this.addButton( this.tFacades );
}
@Override
@@ -82,8 +82,8 @@ public class GuiNetworkTool extends AEBaseGui
this.tFacades.setState( ( (ContainerNetworkTool) this.inventorySlots ).isFacadeMode() );
}
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -107,32 +107,32 @@ public class GuiPatternTerm extends GuiMEMonitorable
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.CRAFTING_TABLE ), GuiText.CraftingPattern
.getLocal(), this.itemRender );
this.buttonList.add( this.tabCraftButton );
this.addButton( this.tabCraftButton );
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.FURNACE ), GuiText.ProcessingPattern
.getLocal(), this.itemRender );
this.buttonList.add( this.tabProcessButton );
this.addButton( this.tabProcessButton );
this.substitutionsEnabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.ENABLED );
this.substitutionsEnabledBtn.setHalfSize( true );
this.buttonList.add( this.substitutionsEnabledBtn );
this.addButton( this.substitutionsEnabledBtn );
this.substitutionsDisabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.DISABLED );
this.substitutionsDisabledBtn.setHalfSize( true );
this.buttonList.add( this.substitutionsDisabledBtn );
this.addButton( this.substitutionsDisabledBtn );
this.clearBtn = new GuiImgButton( this.guiLeft + 74, this.guiTop + this.ySize - 163, Settings.ACTIONS, ActionItems.CLOSE );
this.clearBtn.setHalfSize( true );
this.buttonList.add( this.clearBtn );
this.addButton( this.clearBtn );
this.encodeBtn = new GuiImgButton( this.guiLeft + 147, this.guiTop + this.ySize - 142, Settings.ACTIONS, ActionItems.ENCODE );
this.buttonList.add( this.encodeBtn );
this.addButton( this.encodeBtn );
}
@Override
@@ -163,7 +163,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
}
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRenderer.drawString( GuiText.PatternTerminal.getLocal(), 8, this.ySize - 96 + 2 - this.getReservedSpace(), 4210752 );
this.font.drawString( GuiText.PatternTerminal.getLocal(), 8, this.ySize - 96 + 2 - this.getReservedSpace(), 4210752 );
}
@Override
@@ -62,24 +62,24 @@ public class GuiPriority extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
final int a = AEConfig.instance().priorityByStacksAmounts( 0 );
final int b = AEConfig.instance().priorityByStacksAmounts( 1 );
final int c = AEConfig.instance().priorityByStacksAmounts( 2 );
final int d = AEConfig.instance().priorityByStacksAmounts( 3 );
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 32, 22, 20, "+" + a ) );
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 32, 28, 20, "+" + b ) );
this.buttonList.add( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 32, 32, 20, "+" + c ) );
this.buttonList.add( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 32, 38, 20, "+" + d ) );
this.addButton( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 32, 22, 20, "+" + a ) );
this.addButton( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 32, 28, 20, "+" + b ) );
this.addButton( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 32, 32, 20, "+" + c ) );
this.addButton( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 32, 38, 20, "+" + d ) );
this.buttonList.add( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 69, 22, 20, "-" + a ) );
this.buttonList.add( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 69, 28, 20, "-" + b ) );
this.buttonList.add( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 69, 32, 20, "-" + c ) );
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 69, 38, 20, "-" + d ) );
this.addButton( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 69, 22, 20, "-" + a ) );
this.addButton( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 69, 28, 20, "-" + b ) );
this.addButton( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 69, 32, 20, "-" + c ) );
this.addButton( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 69, 38, 20, "-" + d ) );
final ContainerPriority con = ( (ContainerPriority) this.inventorySlots );
final ItemStack myIcon = con.getPriorityHost().getItemStackRepresentation();
@@ -87,10 +87,10 @@ public class GuiPriority extends AEBaseGui
if( this.OriginalGui != null && !myIcon.isEmpty() )
{
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), this.itemRender ) );
this.addButton( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), this.itemRender ) );
}
this.priority = new GuiNumberBox( this.fontRenderer, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRenderer.FONT_HEIGHT, Long.class );
this.priority = new GuiNumberBox( this.font, this.guiLeft + 62, this.guiTop + 57, 59, this.font.FONT_HEIGHT, Long.class );
this.priority.setEnableBackgroundDrawing( false );
this.priority.setMaxStringLength( 16 );
this.priority.setTextColor( 0xFFFFFF );
@@ -102,7 +102,7 @@ public class GuiPriority extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( GuiText.Priority.getLocal(), 8, 6, 4210752 );
this.font.drawString( GuiText.Priority.getLocal(), 8, 6, 4210752 );
}
@Override
@@ -39,8 +39,8 @@ public class GuiQNB extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.QuantumLinkChamber.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.QuantumLinkChamber.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -45,11 +45,11 @@ public class GuiQuartzKnife extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.name = new GuiTextField( 0, this.fontRenderer, this.guiLeft + 24, this.guiTop + 32, 79, this.fontRenderer.FONT_HEIGHT );
this.name = new GuiTextField( 0, this.font, this.guiLeft + 24, this.guiTop + 32, 79, this.font.FONT_HEIGHT );
this.name.setEnableBackgroundDrawing( false );
this.name.setMaxStringLength( 32 );
this.name.setTextColor( 0xFFFFFF );
@@ -60,8 +60,8 @@ public class GuiQuartzKnife extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.QuartzCuttingKnife.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.QuartzCuttingKnife.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
}
@Override
@@ -96,24 +96,24 @@ public class GuiSecurityStation extends GuiMEMonitorable
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
final int top = this.guiTop + this.ySize - 116;
this.buttonList.add( this.inject = new GuiToggleButton( this.guiLeft + 56, top, 11 * 16, 12 * 16, SecurityPermissions.INJECT
this.addButton( this.inject = new GuiToggleButton( this.guiLeft + 56, top, 11 * 16, 12 * 16, SecurityPermissions.INJECT
.getTranslationKey(), SecurityPermissions.INJECT.getUnlocalizedTip() ) );
this.buttonList.add( this.extract = new GuiToggleButton( this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT
this.addButton( this.extract = new GuiToggleButton( this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT
.getTranslationKey(), SecurityPermissions.EXTRACT.getUnlocalizedTip() ) );
this.buttonList.add( this.craft = new GuiToggleButton( this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2, SecurityPermissions.CRAFT
this.addButton( this.craft = new GuiToggleButton( this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2, SecurityPermissions.CRAFT
.getTranslationKey(), SecurityPermissions.CRAFT.getUnlocalizedTip() ) );
this.buttonList.add( this.build = new GuiToggleButton( this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3, SecurityPermissions.BUILD
this.addButton( this.build = new GuiToggleButton( this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3, SecurityPermissions.BUILD
.getTranslationKey(), SecurityPermissions.BUILD.getUnlocalizedTip() ) );
this.buttonList.add( this.security = new GuiToggleButton( this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4, SecurityPermissions.SECURITY
this.addButton( this.security = new GuiToggleButton( this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4, SecurityPermissions.SECURITY
.getTranslationKey(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
}
@@ -121,7 +121,7 @@ public class GuiSecurityStation extends GuiMEMonitorable
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRenderer.drawString( GuiText.SecurityCardEditor.getLocal(), 8, this.ySize - 96 + 1 - this.getReservedSpace(), 4210752 );
this.font.drawString( GuiText.SecurityCardEditor.getLocal(), 8, this.ySize - 96 + 1 - this.getReservedSpace(), 4210752 );
}
@Override
@@ -40,8 +40,8 @@ public class GuiSkyChest extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.SkyChest.getLocal() ), 8, 8, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 2, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.SkyChest.getLocal() ), 8, 8, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 2, 4210752 );
}
@Override
@@ -64,35 +64,35 @@ public class GuiSpatialIOPort extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.units = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.POWER_UNITS, AEConfig.instance().selectedPowerUnit() );
this.buttonList.add( this.units );
this.addButton( this.units );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getCurrentPower(), false ), 13, 21,
this.font.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getCurrentPower(), false ), 13, 21,
4210752 );
this.fontRenderer.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getMaxPower(), false ), 13, 31, 4210752 );
this.fontRenderer.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getRequiredPower(), false ), 13, 73,
this.font.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getMaxPower(), false ), 13, 31, 4210752 );
this.font.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getRequiredPower(), false ), 13, 73,
4210752 );
this.fontRenderer.drawString( GuiText.Efficiency.getLocal() + ": " + ( ( (float) this.container.getEfficency() ) / 100 ) + '%', 13, 83, 4210752 );
this.font.drawString( GuiText.Efficiency.getLocal() + ": " + ( ( (float) this.container.getEfficency() ) / 100 ) + '%', 13, 83, 4210752 );
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96, 4210752 );
if( this.container.xSize != 0 && this.container.ySize != 0 && this.container.zSize != 0 )
{
final String text = GuiText.SCSSize.getLocal() + ": " + this.container.xSize + "x" + this.container.ySize + "x" + this.container.zSize;
this.fontRenderer.drawString( text, 13, 93, 4210752 );
this.font.drawString( text, 13, 93, 4210752 );
}
else
{
this.fontRenderer.drawString( GuiText.SCSSize.getLocal() + ": " + GuiText.SCSInvalid.getLocal(), 13, 93, 4210752 );
this.font.drawString( GuiText.SCSSize.getLocal() + ": " + GuiText.SCSInvalid.getLocal(), 13, 93, 4210752 );
}
}
@@ -68,20 +68,20 @@ public class GuiStorageBus extends GuiUpgradeable
this.storageFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.addButton( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.buttonList.add( this.storageFilter );
this.buttonList.add( this.fuzzyMode );
this.buttonList.add( this.rwMode );
this.buttonList.add( this.partition );
this.buttonList.add( this.clear );
this.addButton( this.storageFilter );
this.addButton( this.fuzzyMode );
this.addButton( this.rwMode );
this.addButton( this.partition );
this.addButton( this.clear );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.StorageBus.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.StorageBus.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
if( this.fuzzyMode != null )
{
@@ -75,9 +75,9 @@ public class GuiUpgradeable extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.addButtons();
}
@@ -88,17 +88,17 @@ public class GuiUpgradeable extends AEBaseGui
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
this.schedulingMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT );
this.buttonList.add( this.craftMode );
this.buttonList.add( this.redstoneMode );
this.buttonList.add( this.fuzzyMode );
this.buttonList.add( this.schedulingMode );
this.addButton( this.craftMode );
this.addButton( this.redstoneMode );
this.addButton( this.fuzzyMode );
this.addButton( this.schedulingMode );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( this.getName().getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( this.getName().getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
if( this.redstoneMode != null )
{
@@ -44,19 +44,19 @@ public class GuiVibrationChamber extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.pb = new GuiProgressBar( this.cvc, "guis/vibchamber.png", 99, 36, 176, 14, 6, 18, Direction.VERTICAL );
this.buttonList.add( this.pb );
this.addButton( this.pb );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.pb.setFullMsg( TileVibrationChamber.POWER_PER_TICK * this.cvc.getCurrentProgress() / TileVibrationChamber.DILATION_SCALING + " AE/t" );
@@ -64,7 +64,7 @@ public class GuiVibrationChamber extends AEBaseGui
{
final int i1 = this.cvc.getRemainingBurnTime() * 12 / 100;
this.bindTexture( "guis/vibchamber.png" );
GlStateManager.color( 1, 1, 1 );
RenderSystem.color4f( 1, 1, 1 );
final int l = -15;
final int k = 25;
this.drawTexturedModalRect( k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2 );
@@ -62,19 +62,19 @@ public class GuiWireless extends AEBaseGui
}
@Override
public void initGui()
public void init()
{
super.initGui();
super.init();
this.units = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.POWER_UNITS, AEConfig.instance().selectedPowerUnit() );
this.buttonList.add( this.units );
this.addButton( this.units );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.Wireless.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.font.drawString( this.getGuiDisplayName( GuiText.Wireless.getLocal() ), 8, 6, 4210752 );
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
final ContainerWireless cw = (ContainerWireless) this.inventorySlots;
@@ -83,10 +83,10 @@ public class GuiWireless extends AEBaseGui
final String firstMessage = GuiText.Range.getLocal() + ": " + ( cw.getRange() / 10.0 ) + " m";
final String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.getDrain(), true );
final int strWidth = Math.max( this.fontRenderer.getStringWidth( firstMessage ), this.fontRenderer.getStringWidth( secondMessage ) );
final int strWidth = Math.max( this.font.getStringWidth( firstMessage ), this.font.getStringWidth( secondMessage ) );
final int cOffset = ( this.xSize / 2 ) - ( strWidth / 2 );
this.fontRenderer.drawString( firstMessage, cOffset, 20, 4210752 );
this.fontRenderer.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
this.font.drawString( firstMessage, cOffset, 20, 4210752 );
this.font.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
}
}