mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Fix (hopefully) attack icons on cards and a possible NPE.
This commit is contained in:
@@ -11,7 +11,6 @@ import java.net.URI;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JPopupMenu;
|
||||
@@ -440,7 +439,7 @@ public class GuiDesktop implements IGuiBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCards(final Set<CardView> cardsToUpdate) {
|
||||
public void updateCards(final Iterable<CardView> cardsToUpdate) {
|
||||
CMatchUI.SINGLETON_INSTANCE.updateCards(cardsToUpdate);
|
||||
}
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ public enum CMatchUI implements ICDoc, IMenuProvider {
|
||||
|
||||
}
|
||||
|
||||
public void updateCards(final Set<CardView> cardsToUpdate) {
|
||||
public void updateCards(final Iterable<CardView> cardsToUpdate) {
|
||||
for (final CardView c : cardsToUpdate) {
|
||||
updateSingleCard(c);
|
||||
}
|
||||
|
||||
@@ -386,7 +386,6 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
displayCardNameOverlay(showText && showCardNameOverlay(), imgSize, imgPos);
|
||||
displayPTOverlay(showText && showCardPowerOverlay(), imgSize, imgPos);
|
||||
displayCardIdOverlay(showText && showCardIdOverlay(), imgSize, imgPos);
|
||||
displayIconOverlay(getGraphics());
|
||||
}
|
||||
|
||||
private void displayCardIdOverlay(boolean isVisible, Dimension imgSize, Point imgPos) {
|
||||
@@ -656,11 +655,9 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.card != cardView) {
|
||||
this.updatePTOverlay(); //update PT Overlay if card changes
|
||||
}
|
||||
|
||||
this.card = cardView;
|
||||
this.doLayout();
|
||||
|
||||
if (!this.isShowing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -707,7 +707,7 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
|
||||
toPanel.setAttachedToPanel(null);
|
||||
}
|
||||
|
||||
toPanel.setCard(toPanel.getCard());
|
||||
toPanel.setCard(card);
|
||||
if (fromRefresh) {
|
||||
toPanel.updatePTOverlay(); //ensure PT Overlay updated on refresh
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user