mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Make the -/+ buttons in the deck editor consistent with the -/+ buttons in the add basic lands dialog.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user