tagtabs: show tab separators in tag tabs
This changes tag tabs to actually put the bank in search mode, still without providing any search input, so that the bank tab builder will draw tab separators (both the separator line and tab text label)
This commit is contained in:
@@ -313,9 +313,9 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener
|
||||
final int itemId = intStack[intStackSize - 1];
|
||||
final String searchfilter = stringStack[stringStackSize - 1];
|
||||
|
||||
// This event fires regardless of the bank being in search mode. If we have a current
|
||||
// tab set then the bank should be not in search mode (and the filter empty). Otherwise
|
||||
// the filter is either empty for no search or contains the search filter.
|
||||
// This event only fires when the bank is in search mode. It will fire even if there is no search
|
||||
// input. We prevent having a tag tab open while also performing a normal search, so if a tag tab
|
||||
// is active here it must mean we have placed the bank into search mode. See onScriptPostFired().
|
||||
TagTab activeTab = tabInterface.getActiveTab();
|
||||
String search = activeTab != null ? TAG_SEARCH + activeTab.getTag() : searchfilter;
|
||||
|
||||
@@ -499,6 +499,17 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener
|
||||
@Subscribe
|
||||
public void onScriptPostFired(ScriptPostFired event)
|
||||
{
|
||||
if (event.getScriptId() == ScriptID.BANKMAIN_SEARCHING)
|
||||
{
|
||||
// The return value of bankmain_searching is on the stack. If we have a tag tab active
|
||||
// make it return true to put the bank in a searching state.
|
||||
if (tabInterface.getActiveTab() != null || tabInterface.isTagTabActive())
|
||||
{
|
||||
client.getIntStack()[client.getIntStackSize() - 1] = 1; // true
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getScriptId() != ScriptID.BANKMAIN_BUILD || !config.removeSeparators())
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user