Merge pull request #9528 from trimbe/saved-tag-tabs
bank tags: properly open saved tab
This commit is contained in:
@@ -690,8 +690,7 @@ public interface Client extends GameEngine
|
|||||||
* @param varbit the variable
|
* @param varbit the variable
|
||||||
* @param value the new value
|
* @param value the new value
|
||||||
*/
|
*/
|
||||||
@VisibleForDevtools
|
void setVarbit(Varbits varbit, int value);
|
||||||
void setSetting(Varbits varbit, int value);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value of a given variable.
|
* Gets the value of a given variable.
|
||||||
|
|||||||
@@ -215,6 +215,8 @@ public class TabInterface
|
|||||||
|
|
||||||
if (config.rememberTab() && !Strings.isNullOrEmpty(config.tab()))
|
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());
|
openTag(config.tab());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -327,7 +329,7 @@ public class TabInterface
|
|||||||
switch (event.getOp())
|
switch (event.getOp())
|
||||||
{
|
{
|
||||||
case Tab.OPEN_TAG:
|
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();
|
Widget clicked = event.getSource();
|
||||||
|
|
||||||
TagTab tab = tabManager.find(Text.removeTags(clicked.getName()));
|
TagTab tab = tabManager.find(Text.removeTags(clicked.getName()));
|
||||||
|
|||||||
Reference in New Issue
Block a user