mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Merge branch 'unstable-basic-lands' into 'master'
- Render Unstable basic lands borderless. See merge request core-developers/forge!160
This commit is contained in:
@@ -1103,9 +1103,14 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
||||
final int selBorderSize = 1;
|
||||
|
||||
// Determine whether to render border from properties
|
||||
boolean noBorder = !isPreferenceEnabled(ForgePreferences.FPref.UI_RENDER_BLACK_BORDERS) ||
|
||||
(itemInfo.item instanceof IPaperCard && CardView.getCardForUi((IPaperCard)itemInfo.item).
|
||||
getCurrentState().getSetCode().equalsIgnoreCase("MPS_AKH"));
|
||||
boolean noBorder = !isPreferenceEnabled(ForgePreferences.FPref.UI_RENDER_BLACK_BORDERS);
|
||||
if (itemInfo.item instanceof IPaperCard) {
|
||||
CardView cv = CardView.getCardForUi((IPaperCard) itemInfo.item);
|
||||
// Amonkhet Invocations
|
||||
noBorder |= cv.getCurrentState().getSetCode().equalsIgnoreCase("MPS_AKH");
|
||||
// Unstable basic lands
|
||||
noBorder |= cv.getCurrentState().isBasicLand() && cv.getCurrentState().getSetCode().equalsIgnoreCase("UST");
|
||||
}
|
||||
|
||||
final int borderSize = noBorder? 0 : Math.round(itemWidth * CardPanel.BLACK_BORDER_SIZE);
|
||||
final int cornerSize = Math.max(4, Math.round(itemWidth * CardPanel.ROUNDED_CORNER_SIZE));
|
||||
|
||||
@@ -364,7 +364,11 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
boolean noBorderPref = !isPreferenceEnabled(FPref.UI_RENDER_BLACK_BORDERS);
|
||||
|
||||
// Borderless cards should be accounted for here
|
||||
// Amonkhet Invocations
|
||||
boolean noBorderOnCard = getCard().getCurrentState().getSetCode().equalsIgnoreCase("MPS_AKH");
|
||||
// Unstable basic lands
|
||||
noBorderOnCard |= getCard().getCurrentState().isBasicLand() && getCard().getCurrentState().getSetCode().equalsIgnoreCase("UST");
|
||||
|
||||
boolean cardImgHasAlpha = imagePanel != null && imagePanel.getSrcImage() != null && imagePanel.getSrcImage().getColorModel().hasAlpha();
|
||||
|
||||
if (!noBorderPref && !(noBorderOnCard && cardImgHasAlpha)) {
|
||||
|
||||
Reference in New Issue
Block a user