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:
magenoxx 2011-01-30 19:01:26 +03:00
parent 4cc14cb3ed
commit a99be05446
4 changed files with 26 additions and 18 deletions

View file

@ -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);

View file

@ -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]*/);
}

View file

@ -55,8 +55,10 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
List<String> rules = card.getRules();
List<String> rulings = new ArrayList<String>(rules);
try {
if (card instanceof PermanentView) {
int count = ((PermanentView)card).getCounters().size();
List<CounterView> counters = ((PermanentView)card).getCounters();
int count = counters != null ? counters.size() : 0;
if (count > 0) {
StringBuilder sb = new StringBuilder();
int index = 0;
@ -74,6 +76,9 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
rulings.add(sb.toString());
}
}
} catch (Exception e) {
e.printStackTrace();
}
boolean smallImages = true;
int fontSize = 11;