GUI: added problem cards selection on legality label clicks (#6854)

This commit is contained in:
Oleg Agafonov 2020-08-17 05:14:12 +04:00
parent a4af5501f9
commit 486c0d7c2c
17 changed files with 167 additions and 105 deletions

View file

@ -1064,6 +1064,19 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
}
}
public void selectByName(List<String> cardNames) {
for (List<List<CardView>> gridRow : cardGrid) {
for (List<CardView> stack : gridRow) {
for (CardView card : stack) {
if (cardNames.contains(card.getName())) {
card.setSelected(true);
cardViews.get(card.getId()).update(card);
}
}
}
}
}
private void hideSelection() {
Collection<CardView> toHide = dragCardList();
for (DragCardGridListener l : listeners) {