mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-19 19:50:00 +00:00
Use AE2 config setting to save search string in WCT
closes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/9848
This commit is contained in:
1 parent
978fc5f7c6
commit
db9977b715
2 files changed
+3
-5
No files matched your search
+3
-3
@@ -202,7 +202,7 @@ public class GuiWirelessCraftingTerminal extends GuiContainer implements ISortSo
|
||||
}
|
||||
else if( btn == this.searchStringSave )
|
||||
{
|
||||
ConfigHandler.saveSearchString = next == YesNo.YES;
|
||||
AEConfig.instance.preserveSearchBar = next == YesNo.YES;
|
||||
}
|
||||
else {
|
||||
try {
|
||||
@@ -375,7 +375,7 @@ public class GuiWirelessCraftingTerminal extends GuiContainer implements ISortSo
|
||||
this.buttonList.add(this.searchBoxSettings = new GuiImgButton(this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE)));
|
||||
offset += 20;
|
||||
|
||||
this.buttonList.add( this.searchStringSave = new GuiImgButton( this.guiLeft - 18, offset, Settings.SAVE_SEARCH, ConfigHandler.saveSearchString ? YesNo.YES : YesNo.NO ) );
|
||||
this.buttonList.add( this.searchStringSave = new GuiImgButton( this.guiLeft - 18, offset, Settings.SAVE_SEARCH, AEConfig.instance.preserveSearchBar ? YesNo.YES : YesNo.NO ) );
|
||||
offset += 20;
|
||||
|
||||
this.buttonList.add( this.terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings.getSetting( Settings.TERMINAL_STYLE ) ) );
|
||||
@@ -394,7 +394,7 @@ public class GuiWirelessCraftingTerminal extends GuiContainer implements ISortSo
|
||||
final Enum setting = AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE);
|
||||
this.searchField.setFocused(SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting);
|
||||
|
||||
if (ConfigHandler.saveSearchString || this.isSubGui()) {
|
||||
if (AEConfig.instance.preserveSearchBar || this.isSubGui()) {
|
||||
this.searchField.setText(memoryText);
|
||||
this.repo.setSearchString(memoryText);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ public class ConfigHandler {
|
||||
public static boolean firstLoad = true;
|
||||
private static int pwrInCfgFile, boosterDropInCfgFile;
|
||||
private static boolean mtChanged = false;
|
||||
public static boolean saveSearchString = false;
|
||||
|
||||
public static void init(File configFile) {
|
||||
if (config == null) {
|
||||
@@ -60,7 +59,6 @@ public class ConfigHandler {
|
||||
boosterDropsEnabled = config.getBoolean("boosterDropsEnabled", Configuration.CATEGORY_GENERAL, true, boosterDropEnabledDesc);
|
||||
mineTweakerOverride = config.getBoolean("mineTweakerOverride", Configuration.CATEGORY_GENERAL, false, mineTweakerOverrideDesc);
|
||||
doVersionCheck = config.getBoolean("doVersionCheck", Configuration.CATEGORY_GENERAL, true, doVersionCheckDesc);
|
||||
saveSearchString = config.getBoolean("saveSearchString", Configuration.CATEGORY_GENERAL, false, saveSearchStringDesc);
|
||||
/*
|
||||
* I did the max power cfg loading like this because while using
|
||||
* Configuration#getInt did enforce the min/max values in-game, it
|
||||
|
||||
Reference in new issue
Block a user