- Make the -/+ buttons in the deck editor consistent with the -/+ buttons in the add basic lands dialog.

This commit is contained in:
Agetian
2017-01-11 06:56:46 +00:00
parent 17bd19a46b
commit aa3e76544b

View File

@@ -48,12 +48,12 @@ public class DeckQuantityRenderer extends ItemCellRenderer {
int delta = 0;
int x = e.getX() - cellBounds.x;
if (x <= imgSize) { //add button
delta = 1;
}
else if (x >= cellBounds.width - imgSize) { //remove button
if (x <= imgSize) { //remove button
delta = -1;
}
else if (x >= cellBounds.width - imgSize) { //add button
delta = 1;
}
if (delta != 0) {
listView.getTable().setRowSelectionInterval(row, row); //must set selection first so scroll doesn't get messed up
@@ -73,7 +73,7 @@ public class DeckQuantityRenderer extends ItemCellRenderer {
super.paint(g);
int y = (this.getHeight() - imgSize) / 2;
FSkin.drawImage(g, imgAdd, 0, y, imgSize, imgSize);
FSkin.drawImage(g, imgRemove, this.getWidth() - imgSize, y, imgSize, imgSize);
FSkin.drawImage(g, imgRemove, 0, y, imgSize, imgSize);
FSkin.drawImage(g, imgAdd, this.getWidth() - imgSize, y, imgSize, imgSize);
}
}