Tweaked Terminal Gui to use smaller textures.

Crafting Terminal Added, ( incomplete )
Moved FMP Cut-able Registration to Init.
Upgrades now drop when parts break.
TE -> TE3 pulverizer api.
This commit is contained in:
AlgorithmX2
2014-02-04 20:44:54 -06:00
parent 01684cf7c7
commit f8e6a426ce
12 changed files with 132 additions and 16 deletions
@@ -0,0 +1,28 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.InventoryPlayer;
import appeng.api.storage.IStorageMonitorable;
import appeng.container.implementations.ContainerCraftingTerm;
import appeng.core.localization.GuiText;
public class GuiCraftingTerm extends GuiMEMonitorable
{
public GuiCraftingTerm(InventoryPlayer inventoryPlayer, IStorageMonitorable te) {
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
reservedSpace = 73;
}
protected String getBackground()
{
return "guis/crafting.png";
}
@Override
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
{
super.drawFG( offsetX, offsetY, mouseX, mouseY );
fontRenderer.drawString( GuiText.CraftingTerminal.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
}
}
@@ -35,6 +35,7 @@ public class GuiMEMonitorable extends AEBaseMEGui
int xoffset = 9;
int perRow = 9;
int reservedSpace = 0;
int lowerTextureOffset = 0;
int rows = 0;
int maxRows = Integer.MAX_VALUE;
@@ -83,7 +84,8 @@ public class GuiMEMonitorable extends AEBaseMEGui
{
int NEI = 0;
int top = 4;
int extraSpace = height - 114 - NEI - top - reservedSpace;
int magicNumber = 114 + 1;
int extraSpace = height - magicNumber - NEI - top - reservedSpace;
rows = (int) Math.floor( extraSpace / 18 );
if ( rows > maxRows )
@@ -106,7 +108,7 @@ public class GuiMEMonitorable extends AEBaseMEGui
// extra slots : 72
// slot 18
this.ySize = 114 + rows * 18 + reservedSpace;
this.ySize = magicNumber + rows * 18 + reservedSpace;
this.guiTop = top;
buttonList.add( new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.SORT_BY, Configuration.instance.settings.getSetting( Settings.SORT_BY ) ) );
@@ -127,7 +129,7 @@ public class GuiMEMonitorable extends AEBaseMEGui
if ( s instanceof AppEngSlot )
{
if ( ((AppEngSlot) s).xDisplayPosition < 197 )
((AppEngSlot) s).yDisplayPosition = ((AppEngSlot) s).defY + ySize - 78 - 4;
((AppEngSlot) s).yDisplayPosition = ((AppEngSlot) s).defY + ySize - 78 - 5;
}
}
}
@@ -176,7 +178,7 @@ public class GuiMEMonitorable extends AEBaseMEGui
for (int x = 0; x < rows; x++)
this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 );
this.drawTexturedModalRect( offsetX, offsetY + 16 + rows * 18, 0, 106, x_width, 98 + reservedSpace );
this.drawTexturedModalRect( offsetX, offsetY + 16 + rows * 18 + lowerTextureOffset, 0, 106 - 18 - 18, x_width, 99 + reservedSpace - lowerTextureOffset );
searchField.drawTextBox();
}
+3 -3
View File
@@ -16,7 +16,7 @@ public class GuiSecurity extends GuiMEMonitorable
public GuiSecurity(InventoryPlayer inventoryPlayer, IStorageMonitorable te) {
super( inventoryPlayer, te, new ContainerSecurity( inventoryPlayer, te ) );
reservedSpace = 32;
reservedSpace = 33;
xSize += 50;
}
@@ -27,7 +27,7 @@ public class GuiSecurity extends GuiMEMonitorable
{
super.initGui();
int top = this.guiTop + this.ySize - 114;
int top = this.guiTop + this.ySize - 116;
buttonList.add( inject = new GuiToggleButton( this.guiLeft + 56 + 18 * 0, top, 11 * 16 + 0, 12 * 16 + 0, SecurityPermissions.INJECT
.getUnlocalizedName(), SecurityPermissions.INJECT.getUnlocalizedTip() ) );
@@ -92,7 +92,7 @@ public class GuiSecurity extends GuiMEMonitorable
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
{
super.drawFG( offsetX, offsetY, mouseX, mouseY );
fontRenderer.drawString( GuiText.SecurityCardEditor.getLocal(), 8, ySize - 96 + 3 - reservedSpace, 4210752 );
fontRenderer.drawString( GuiText.SecurityCardEditor.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
}
}