forked from External/mage
GUI: added problem cards selection on legality label clicks (#6854)
This commit is contained in:
parent
a4af5501f9
commit
486c0d7c2c
17 changed files with 167 additions and 105 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue