Foil effect not shown on opened packs

I've investigated this problem.
In short, these views use CardPicturePanel, which seems to fetch the image for a card (generic) instead of a card (inventory item).
The relevant part of the code looks like this (in CardPicturePanel.java):
Unfortunately, I have no idea how to add the foil effect to the image, but at least I know where it goes now.
The other possible solution I see is replacing CardPicturePanel with a different class that displays cards, one that already supports foils. One such class I found is CardPanel, but I don't know the correct parameters to use it, or if it can even be used outside of a match.
In short, these views use CardPicturePanel, which seems to fetch the image for a card (generic) instead of a card (inventory item).
The relevant part of the code looks like this (in CardPicturePanel.java):
- Code: Select all
if (displayed instanceof InventoryItem) {
final InventoryItem item = (InventoryItem) displayed;
return ImageCache.getOriginalImage(item.getImageKey(false), true);
}
Unfortunately, I have no idea how to add the foil effect to the image, but at least I know where it goes now.
The other possible solution I see is replacing CardPicturePanel with a different class that displays cards, one that already supports foils. One such class I found is CardPanel, but I don't know the correct parameters to use it, or if it can even be used outside of a match.