Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/inventorysetups/InventorySetupsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import static inventorysetups.InventorySetupsPlugin.CONFIG_KEY_LAYOUT_DEFAULT;
import static inventorysetups.InventorySetupsPlugin.CONFIG_KEY_LAYOUT_DUPLICATES;
import static inventorysetups.InventorySetupsPlugin.CONFIG_KEY_MANUAL_BANK_FILTER;
import static inventorysetups.InventorySetupsPlugin.CONFIG_KEY_CLOSE_WITH_BANK;
import static inventorysetups.InventorySetupsPlugin.CONFIG_KEY_PANEL_VIEW;
import static inventorysetups.InventorySetupsPlugin.CONFIG_KEY_PERSIST_HOTKEYS;
import static inventorysetups.InventorySetupsPlugin.CONFIG_KEY_SECTION_MODE;
Expand Down Expand Up @@ -511,6 +512,16 @@ default boolean enableLayoutWarning()
return true;
}

@ConfigItem(
keyName = CONFIG_KEY_CLOSE_WITH_BANK,
name = "Close with Bank",
description = "Close your current setup when you close the bank",
section = otherSection
)
default boolean closeWithBank()
{
return false;
}


}
5 changes: 5 additions & 0 deletions src/main/java/inventorysetups/InventorySetupsPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public class InventorySetupsPlugin extends Plugin
public static final String CONFIG_KEY_VERSION_STR = "version";
public static final String CONFIG_KEY_UNASSIGNED_MAXIMIZED = "unassignedMaximized";
public static final String CONFIG_KEY_MANUAL_BANK_FILTER = "manualBankFilter";
public static final String CONFIG_KEY_CLOSE_WITH_BANK = "closeWithBank";
public static final String CONFIG_KEY_PERSIST_HOTKEYS = "persistHotKeysOutsideBank";
public static final String CONFIG_KEY_USE_LAYOUTS = "useLayouts";
public static final String CONFIG_KEY_LAYOUT_DEFAULT = "defaultLayout";
Expand Down Expand Up @@ -897,7 +898,11 @@ private void onWidgetClosed(WidgetClosed event)
{
unregisterHotkeys();
}
if (config.closeWithBank())
{
clientThread.invokeLater(() -> panel.returnToOverviewPanel(false));

}
if (isInventorySetupTagOpen())
{
// Close the bank tag for those who use manual bank filter
Expand Down