Fix issues with Pattern Terminal.
This commit is contained in:
@@ -144,8 +144,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
boolean hasNEI = AppEng.instance.isIntegrationEnabled( "NEI" );
|
||||
|
||||
int NEI = hasNEI ? 4 : 0;
|
||||
int top = hasNEI ? 22 : 4;
|
||||
int NEI = hasNEI ? 0 : 0;
|
||||
int top = hasNEI ? 22 : 0;
|
||||
|
||||
int magicNumber = 114 + 1;
|
||||
int extraSpace = height - magicNumber - NEI - top - reservedSpace;
|
||||
@@ -183,7 +183,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
// slot 18
|
||||
|
||||
this.ySize = magicNumber + rows * 18 + reservedSpace;
|
||||
this.guiTop = top;
|
||||
// this.guiTop = top;
|
||||
int unusedSpace = height - ySize;
|
||||
guiTop = (int) Math.floor( (float) unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f) );
|
||||
|
||||
int offset = guiTop + 8;
|
||||
|
||||
@@ -235,9 +237,15 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
if ( s instanceof AppEngSlot )
|
||||
{
|
||||
if ( ((AppEngSlot) s).xDisplayPosition < 197 )
|
||||
((AppEngSlot) s).yDisplayPosition = ((AppEngSlot) s).defY + ySize - 78 - 5;
|
||||
repositionSlot( (AppEngSlot) s );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void repositionSlot(AppEngSlot s)
|
||||
{
|
||||
s.yDisplayPosition = s.defY + ySize - 78 - 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ import appeng.api.storage.ITerminalHost;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerPatternTerm;
|
||||
import appeng.container.slot.AppEngSlot;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
@@ -42,7 +43,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
buttonList.add( clearBtn = new GuiImgButton( this.guiLeft + 74, this.guiTop + this.ySize - 163, Settings.ACTIONS, ActionItems.CLOSE ) );
|
||||
clearBtn.halfSize = true;
|
||||
|
||||
buttonList.add( encodeBtn = new GuiImgButton( this.guiLeft + 147, this.guiTop + this.ySize - 144, Settings.ACTIONS, ActionItems.ENCODE ) );
|
||||
buttonList.add( encodeBtn = new GuiImgButton( this.guiLeft + 147, this.guiTop + this.ySize - 142, Settings.ACTIONS, ActionItems.ENCODE ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,10 +82,18 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
}
|
||||
}
|
||||
|
||||
protected void repositionSlot(AppEngSlot s)
|
||||
{
|
||||
if ( s.isPlayerSide() )
|
||||
s.yDisplayPosition = s.defY + ySize - 78 - 5;
|
||||
else
|
||||
s.yDisplayPosition = s.defY + ySize - 78 - 3;
|
||||
}
|
||||
|
||||
public GuiPatternTerm(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
super( inventoryPlayer, te, new ContainerPatternTerm( inventoryPlayer, te ) );
|
||||
container = (ContainerPatternTerm) this.inventorySlots;
|
||||
reservedSpace = 85;
|
||||
reservedSpace = 81;
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
|
||||
Reference in New Issue
Block a user