tagtabs: fix clearing bank search when opening tags
This commit is contained in:
@@ -77,11 +77,14 @@ public class BankSearch
|
|||||||
// selecting/changing tab
|
// selecting/changing tab
|
||||||
if (closeChat)
|
if (closeChat)
|
||||||
{
|
{
|
||||||
client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 0, 0);
|
// this clears the input text and type, and resets the chatbox to allow input
|
||||||
|
client.runScript(ScriptID.MESSAGE_LAYER_CLOSE, 1, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
client.setVar(VarClientInt.INPUT_TYPE, InputType.NONE.getType());
|
||||||
|
client.setVar(VarClientStr.INPUT_TEXT, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
client.setVar(VarClientInt.INPUT_TYPE, InputType.NONE.getType());
|
|
||||||
client.setVar(VarClientStr.INPUT_TEXT, "");
|
|
||||||
|
|
||||||
layoutBank();
|
layoutBank();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -409,14 +409,14 @@ public class TabInterface
|
|||||||
if (tab.equals(activeTab))
|
if (tab.equals(activeTab))
|
||||||
{
|
{
|
||||||
activateTab(null);
|
activateTab(null);
|
||||||
|
bankSearch.reset(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
openTag(Text.removeTags(clicked.getName()));
|
openTag(Text.removeTags(clicked.getName()));
|
||||||
|
// openTag will reset and relayout
|
||||||
}
|
}
|
||||||
|
|
||||||
bankSearch.reset(true);
|
|
||||||
|
|
||||||
client.playSoundEffect(SoundEffectID.UI_BOOP);
|
client.playSoundEffect(SoundEffectID.UI_BOOP);
|
||||||
break;
|
break;
|
||||||
case Tab.CHANGE_ICON:
|
case Tab.CHANGE_ICON:
|
||||||
@@ -1170,12 +1170,15 @@ public class TabInterface
|
|||||||
{
|
{
|
||||||
activateTab(tabManager.find(tag));
|
activateTab(tabManager.find(tag));
|
||||||
tagTabActive = BankTagsPlugin.TAG_TABS_CONFIG.equals(tag);
|
tagTabActive = BankTagsPlugin.TAG_TABS_CONFIG.equals(tag);
|
||||||
bankSearch.layoutBank();
|
bankSearch.reset(true); // clear search dialog & relayout bank for new tab.
|
||||||
|
|
||||||
// When tab is selected with search window open, the search window closes but the search button
|
// When searching the button has a script on timer to detect search end, that will set the background back
|
||||||
// stays highlighted, this solves that issue
|
// and remove the timer. However since we are going from a bank search to our fake search this will not remove
|
||||||
Widget searchBackground = client.getWidget(WidgetInfo.BANK_SEARCH_BUTTON_BACKGROUND);
|
// the timer but instead re-add it and reset the background. So remove the timer and the background. This is the
|
||||||
searchBackground.setSpriteId(SpriteID.EQUIPMENT_SLOT_TILE);
|
// same as bankmain_search_setbutton.
|
||||||
|
Widget searchButtonBackground = client.getWidget(WidgetInfo.BANK_SEARCH_BUTTON_BACKGROUND);
|
||||||
|
searchButtonBackground.setOnTimerListener((Object[]) null);
|
||||||
|
searchButtonBackground.setSpriteId(SpriteID.EQUIPMENT_SLOT_TILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MenuEntry[] createMenuEntry(MenuEntryAdded event, String option, String target, MenuEntry[] entries)
|
private static MenuEntry[] createMenuEntry(MenuEntryAdded event, String option, String target, MenuEntry[] entries)
|
||||||
|
|||||||
Reference in New Issue
Block a user