Removed Terminal style from Portable Cell Gui.

Portable Cell now only shows 3 rows now, like it should.
Security Gui now has the proper width.
Fixed bug introduced in #90 to show background behind security terminal slots.
This commit is contained in:
AlgorithmX2
2014-04-16 13:48:03 -05:00
parent 71b5fd4555
commit f5fc2ba18e
3 changed files with 22 additions and 7 deletions
@@ -129,7 +129,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
@Override
public void initGui()
{
maxRows = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 6 : Integer.MAX_VALUE;
maxRows = getMaxRows();
perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ((width - standardSize) / 18);
int NEI = 0;
@@ -181,9 +181,12 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
.getSetting( Settings.SEARCH_MODE ) ) );
offset += 20;
buttonList.add( terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings
.getSetting( Settings.TERMINAL_STYLE ) ) );
if ( !(this instanceof GuiMEPortableCell ) )
{
buttonList.add( terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings
.getSetting( Settings.TERMINAL_STYLE ) ) );
}
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
searchField.setEnableBackgroundDrawing( false );
searchField.setMaxStringLength( 25 );
@@ -296,7 +299,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
bindTexture( getBackground() );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
if ( viewCell )
if ( viewCell || ( this instanceof GuiSecurity))
this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 );
for (int x = 0; x < rows; x++)
@@ -369,4 +372,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
return repo.hasPower();
}
int getMaxRows()
{
return AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 6 : Integer.MAX_VALUE;
}
}