Skip to content

Commit

Permalink
add option to remember the terminal search
Browse files Browse the repository at this point in the history
  • Loading branch information
thiakil committed Jul 18, 2017
1 parent b109282 commit 20af69c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public void onGuiClosed()
{
super.onGuiClosed();
Keyboard.enableRepeatEvents( false );
memoryText = this.searchField.getText();
memoryText = AEConfig.instance().getRememberTerminalSearchOnClose() ? this.searchField.getText() : "";
}

@Override
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/appeng/core/AEConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
private boolean disableColoredCableRecipesInJEI = true;
private int craftingCalculationTimePerTick = 5;
private PowerUnits selectedPowerUnit = PowerUnits.AE;
private boolean rememberTerminalSearchOnClose = false;

// GUI Buttons
private final int[] craftByStacks = { 1, 10, 100, 1000 };
Expand Down Expand Up @@ -284,6 +285,8 @@ private void clientSync()
this.useLargeFonts = this.get( "Client", "useTerminalUseLargeFont", false ).getBoolean( false );
this.useColoredCraftingStatus = this.get( "Client", "useColoredCraftingStatus", true ).getBoolean( true );

this.rememberTerminalSearchOnClose = this.get("Client", "rememberTerminalSearchOnClose", this.rememberTerminalSearchOnClose, "Remember what was searched on the terminal after close").getBoolean();

// load buttons..
for( int btnNum = 0; btnNum < 4; btnNum++ )
{
Expand Down Expand Up @@ -775,4 +778,6 @@ void setStorageProviderID( int id )
{
this.storageProviderID = id;
}

public boolean getRememberTerminalSearchOnClose() { return this.rememberTerminalSearchOnClose; }
}

0 comments on commit 20af69c

Please sign in to comment.