MCPcopy Create free account
hub / github.com/Card-Forge/forge / update

Method update

forge-gui-mobile/src/forge/screens/match/views/VStack.java:111–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 12

restoreOldZonesMethod · 0.95
getLocalizerMethod · 0.95
getMenuTabMethod · 0.80
getGameViewMethod · 0.65
sizeMethod · 0.65
setTextMethod · 0.65
isVisibleMethod · 0.65
hideMethod · 0.65
updateMethod · 0.65
getStackMethod · 0.45
getMessageMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected