Merge pull request #9528 from trimbe/saved-tag-tabs

bank tags: properly open saved tab
This commit is contained in:
Adam
2019-08-09 20:41:38 -04:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -690,8 +690,7 @@ public interface Client extends GameEngine
* @param varbit the variable
* @param value the new value
*/
@VisibleForDevtools
void setSetting(Varbits varbit, int value);
void setVarbit(Varbits varbit, int value);
/**
* Gets the value of a given variable.

View File

@@ -215,6 +215,8 @@ public class TabInterface
if (config.rememberTab() && !Strings.isNullOrEmpty(config.tab()))
{
// the server will resync the last opened vanilla tab when the bank is opened
client.setVarbit(Varbits.CURRENT_BANK_TAB, 0);
openTag(config.tab());
}
}
@@ -327,7 +329,7 @@ public class TabInterface
switch (event.getOp())
{
case Tab.OPEN_TAG:
client.setVarbitValue(client.getVarps(), Varbits.CURRENT_BANK_TAB.getId(), 0);
client.setVarbit(Varbits.CURRENT_BANK_TAB, 0);
Widget clicked = event.getSource();
TagTab tab = tabManager.find(Text.removeTags(clicked.getName()));