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);
|
||||
}
|
||||
});
|
||||
//FIXME: removed on released 0.6 version
|
||||
btnNewDraft.setVisible(false);
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ public class DeckBuilder {
|
|||
maxSingleCount = Math.max(maxSingleCount, typeCount);
|
||||
}
|
||||
}
|
||||
maxSingleCount = Math.min(maxSingleCount, SINGLE_PENALTY.length - 1);
|
||||
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) {
|
||||
if (card == null) return;
|
||||
if (card == null) return;
|
||||
if (isCurrentCard(card)) return;
|
||||
currentCard = card;
|
||||
currentCard = card;
|
||||
|
||||
ThreadUtils.threadPool.submit(new Runnable() {
|
||||
public void run() {
|
||||
if (!card.equals(currentCard)) return;
|
||||
if (!card.equals(currentCard)) return;
|
||||
|
||||
String manaCost = "";
|
||||
String manaCost = "";
|
||||
for (String m : card.getManaCost()) {
|
||||
manaCost += m;
|
||||
}
|
||||
|
|
@ -55,24 +55,29 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
|||
|
||||
List<String> rules = card.getRules();
|
||||
List<String> rulings = new ArrayList<String>(rules);
|
||||
if (card instanceof PermanentView) {
|
||||
int count = ((PermanentView)card).getCounters().size();
|
||||
if (count > 0) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int index = 0;
|
||||
for (CounterView counter: ((PermanentView)card).getCounters()) {
|
||||
if (counter.getCount() > 0) {
|
||||
if (index == 0) {
|
||||
sb.append("<b>Counters:</b> ");
|
||||
} else {
|
||||
sb.append(", ");
|
||||
try {
|
||||
if (card instanceof PermanentView) {
|
||||
List<CounterView> counters = ((PermanentView)card).getCounters();
|
||||
int count = counters != null ? counters.size() : 0;
|
||||
if (count > 0) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int index = 0;
|
||||
for (CounterView counter: ((PermanentView)card).getCounters()) {
|
||||
if (counter.getCount() > 0) {
|
||||
if (index == 0) {
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue