Foil effect not shown on opened packs
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Foil effect not shown on opened packs
by Seravy » 02 Jul 2017, 14:04
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.
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 103 guests