mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
UI fixes
This commit is contained in:
parent
b5e3d46c72
commit
0013f19fd5
2 changed files with 4 additions and 8 deletions
|
|
@ -81,15 +81,11 @@ public class CardsList extends javax.swing.JPanel implements MouseListener {
|
|||
}
|
||||
|
||||
public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId) {
|
||||
loadCards(showCards, bigCard, gameId, SortBy.UNSORTED);
|
||||
}
|
||||
|
||||
public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId, SortBy sortBy) {
|
||||
//FIXME: why we remove all cards? for performance it's better to merge changes
|
||||
cards = showCards;
|
||||
this.bigCard = bigCard;
|
||||
this.gameId = gameId;
|
||||
drawCards(sortBy);
|
||||
drawCards((SortBy) cbSortBy.getSelectedItem());
|
||||
}
|
||||
|
||||
private void drawCards(SortBy sortBy) {
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ public class DeckArea extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
public void loadDeck(Deck deck, BigCard bigCard) {
|
||||
deckList.loadCards(new CardsView(deck.getCards()), bigCard, null, SortBy.NAME);
|
||||
if (sideboardList.isVisible())
|
||||
sideboardList.loadCards(new CardsView(deck.getSideboard()), bigCard, null, SortBy.NAME);
|
||||
deckList.loadCards(new CardsView(deck.getCards()), bigCard, null);
|
||||
if (sideboardList.isVisible())
|
||||
sideboardList.loadCards(new CardsView(deck.getSideboard()), bigCard, null);
|
||||
}
|
||||
|
||||
public void addDeckEventListener(Listener<Event> listener) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue