mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -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) {
|
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
|
//FIXME: why we remove all cards? for performance it's better to merge changes
|
||||||
cards = showCards;
|
cards = showCards;
|
||||||
this.bigCard = bigCard;
|
this.bigCard = bigCard;
|
||||||
this.gameId = gameId;
|
this.gameId = gameId;
|
||||||
drawCards(sortBy);
|
drawCards((SortBy) cbSortBy.getSelectedItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawCards(SortBy sortBy) {
|
private void drawCards(SortBy sortBy) {
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@ public class DeckArea extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadDeck(Deck deck, BigCard bigCard) {
|
public void loadDeck(Deck deck, BigCard bigCard) {
|
||||||
deckList.loadCards(new CardsView(deck.getCards()), bigCard, null, SortBy.NAME);
|
deckList.loadCards(new CardsView(deck.getCards()), bigCard, null);
|
||||||
if (sideboardList.isVisible())
|
if (sideboardList.isVisible())
|
||||||
sideboardList.loadCards(new CardsView(deck.getSideboard()), bigCard, null, SortBy.NAME);
|
sideboardList.loadCards(new CardsView(deck.getSideboard()), bigCard, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addDeckEventListener(Listener<Event> listener) {
|
public void addDeckEventListener(Listener<Event> listener) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue