()
| 109 | } |
| 110 | |
| 111 | @Override |
| 112 | public void update() { |
| 113 | activeItem = null; |
| 114 | activeStackInstance = null; //reset before updating stack |
| 115 | restoreOldZones(); |
| 116 | |
| 117 | final FCollectionView<StackItemView> stack = MatchController.instance.getGameView().getStack(); |
| 118 | if (stackSize != stack.size()) { |
| 119 | int oldStackSize = stackSize; |
| 120 | stackSize = stack.size(); |
| 121 | getMenuTab().setText(Forge.getLocalizer().getMessage("lblStack") + " (" + stackSize + ")"); |
| 122 | |
| 123 | if (stackSize > 0) { |
| 124 | if (!isVisible()) { |
| 125 | if (stackSize > oldStackSize) { //don't re-show stack if user hid it and then resolved an item on the stack |
| 126 | show(); |
| 127 | } |
| 128 | return; //don't call super.update() either way since show handles this |
| 129 | } |
| 130 | } |
| 131 | else { |
| 132 | hide(); |
| 133 | return; //super.update() isn't needed if hidden |
| 134 | } |
| 135 | } |
| 136 | super.update(); |
| 137 | } |
| 138 | |
| 139 | @Override |
| 140 | protected ScrollBounds updateAndGetPaneSize(float maxWidth, float maxVisibleHeight) { |
nothing calls this directly
no test coverage detected