Merge branch 'master' into 'master'

use multi-select for dig

Closes #799

See merge request core-developers/forge!1296
This commit is contained in:
Michael Kamensky
2019-01-21 14:47:08 +00:00
12 changed files with 307 additions and 96 deletions

View File

@@ -271,18 +271,18 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
// Magenta outline for when card was chosen to pay
if (matchUI.isUsedToPay(getCard())) {
g2d.setColor(Color.magenta);
final int n2 = Math.max(1, Math.round(2 * cardWidth * CardPanel.SELECTED_BORDER_SIZE));
final int n2 = Math.max(4, Math.round(2 * cardWidth * CardPanel.SELECTED_BORDER_SIZE));
g2d.fillRoundRect(cardXOffset - n2, (cardYOffset - n2) + offset, cardWidth + (n2 * 2), cardHeight + (n2 * 2), cornerSize + n2, cornerSize + n2);
} else if (matchUI.isSelectable(getCard())) { // Cyan outline for selectable cards
g2d.setColor(Color.cyan);
final int n2 = Math.max(1, Math.round(2 * cardWidth * CardPanel.SELECTED_BORDER_SIZE));
final int n2 = Math.max(4, Math.round(2 * cardWidth * CardPanel.SELECTED_BORDER_SIZE));
g2d.fillRoundRect(cardXOffset - n2, (cardYOffset - n2) + offset, cardWidth + (n2 * 2), cardHeight + (n2 * 2), cornerSize + n2, cornerSize + n2);
}
// Green outline for hover
if (isSelected) {
g2d.setColor(Color.green);
final int n = Math.max(1, Math.round(cardWidth * CardPanel.SELECTED_BORDER_SIZE));
final int n = Math.max(4, Math.round(cardWidth * CardPanel.SELECTED_BORDER_SIZE));
g2d.fillRoundRect(cardXOffset - n, (cardYOffset - n) + offset, cardWidth + (n * 2), cardHeight + (n * 2), cornerSize + n , cornerSize + n);
}

View File

@@ -179,6 +179,12 @@ public class PlayerControllerForTests extends PlayerController {
return null;
}
@Override
public <T extends GameEntity> List<T> chooseFromTwoListsForEffect(FCollectionView<T> optionList1, FCollectionView<T> optionList2, boolean optional, DelayedReveal delayedReveal, SpellAbility sa, String title, Player targetedPlayer) {
// this isn't used
return null;
}
@Override
public boolean confirmAction(SpellAbility sa, PlayerActionConfirmMode mode, String message) {
return true;