mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Fixed tooltip bug appeared after adding displaying counters. Updated card plugin. Hid New Draft button for release as drafting is not ready yet.
This commit is contained in:
parent
4cc14cb3ed
commit
a99be05446
4 changed files with 26 additions and 18 deletions
Binary file not shown.
|
|
@ -227,6 +227,8 @@ public class TablesPanel extends javax.swing.JPanel implements Observer {
|
||||||
btnNewDraftActionPerformed(evt);
|
btnNewDraftActionPerformed(evt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//FIXME: removed on released 0.6 version
|
||||||
|
btnNewDraft.setVisible(false);
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||||
jPanel1.setLayout(jPanel1Layout);
|
jPanel1.setLayout(jPanel1Layout);
|
||||||
|
|
|
||||||
|
|
@ -249,6 +249,7 @@ public class DeckBuilder {
|
||||||
maxSingleCount = Math.max(maxSingleCount, typeCount);
|
maxSingleCount = Math.max(maxSingleCount, typeCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
maxSingleCount = Math.min(maxSingleCount, SINGLE_PENALTY.length - 1);
|
||||||
return 2 * converted + 3 * (10 - SINGLE_PENALTY[maxSingleCount]/*-DOUBLE_PENALTY[doubleCount]*/);
|
return 2 * converted + 3 * (10 - SINGLE_PENALTY[maxSingleCount]/*-DOUBLE_PENALTY[doubleCount]*/);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,15 +33,15 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCard(final CardView card) {
|
public void setCard(final CardView card) {
|
||||||
if (card == null) return;
|
if (card == null) return;
|
||||||
if (isCurrentCard(card)) return;
|
if (isCurrentCard(card)) return;
|
||||||
currentCard = card;
|
currentCard = card;
|
||||||
|
|
||||||
ThreadUtils.threadPool.submit(new Runnable() {
|
ThreadUtils.threadPool.submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!card.equals(currentCard)) return;
|
if (!card.equals(currentCard)) return;
|
||||||
|
|
||||||
String manaCost = "";
|
String manaCost = "";
|
||||||
for (String m : card.getManaCost()) {
|
for (String m : card.getManaCost()) {
|
||||||
manaCost += m;
|
manaCost += m;
|
||||||
}
|
}
|
||||||
|
|
@ -55,24 +55,29 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
||||||
|
|
||||||
List<String> rules = card.getRules();
|
List<String> rules = card.getRules();
|
||||||
List<String> rulings = new ArrayList<String>(rules);
|
List<String> rulings = new ArrayList<String>(rules);
|
||||||
if (card instanceof PermanentView) {
|
try {
|
||||||
int count = ((PermanentView)card).getCounters().size();
|
if (card instanceof PermanentView) {
|
||||||
if (count > 0) {
|
List<CounterView> counters = ((PermanentView)card).getCounters();
|
||||||
StringBuilder sb = new StringBuilder();
|
int count = counters != null ? counters.size() : 0;
|
||||||
int index = 0;
|
if (count > 0) {
|
||||||
for (CounterView counter: ((PermanentView)card).getCounters()) {
|
StringBuilder sb = new StringBuilder();
|
||||||
if (counter.getCount() > 0) {
|
int index = 0;
|
||||||
if (index == 0) {
|
for (CounterView counter: ((PermanentView)card).getCounters()) {
|
||||||
sb.append("<b>Counters:</b> ");
|
if (counter.getCount() > 0) {
|
||||||
} else {
|
if (index == 0) {
|
||||||
sb.append(", ");
|
sb.append("<b>Counters:</b> ");
|
||||||
|
} else {
|
||||||
|
sb.append(", ");
|
||||||
|
}
|
||||||
|
sb.append(counter.getCount() + "x<i>" + counter.getName() + "</i>");
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
sb.append(counter.getCount() + "x<i>" + counter.getName() + "</i>");
|
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
|
rulings.add(sb.toString());
|
||||||
}
|
}
|
||||||
rulings.add(sb.toString());
|
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean smallImages = true;
|
boolean smallImages = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue