Stats panel now includes card count also for commander deck section (instead of total) for commander (sub)type game format // editor.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This is to allow DeckImport to get all the supported DeckSections in current editor, without relying on using the content of the cbxSection dropdown UI component.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
DeckImport will now get an instance of the CDeckEditor rather than the more generic ACEditorBase.
This is to allow more refined access to methods. Also, all lives in forge-gui-desktop, therefore there should be no conflict with mobile app ui.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
CardPicturePanel now supports back auto-download of card image whenever a placeholder image is being used. This has been enabled for PaperCard instances only, and currently being activated from DeckImport UI. This change won't affect in any way the deck editor as card image is being downloaded from catalog.
Also, the alpha level set to image panel has been now set to 0.5 to control grey-coloured overlay.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
The "disabled" card effect will be used in Deck Import to show the preview of those cards that won't be imported in the deck. The new improved overlay effect has been achieved by adding a grey colour to image with alpha.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
ImageCache now includes a new method to get the full info pair (image, placeHolderFlag) when retrieving a card image.
This will be used in CardPicturePanel to re-enable support for auto-download now that default image is not being used anymore.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
All card tokens (those having an instance of PaperCard set) now share the same message with no code duplication.
The message has been also update - and so corresponding tests - to include set code in square brackets, and collector number (identified by sharp symbol).
This change will also simplify token formatting in Deck import.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
Now statistics do also support to account for any "Limited Card"-Type token found in the list, if the flag to include them is set to true.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
TokenType instantiated by the DeckRecognizer have been further specialised and extended to also include Banned and Restricted Cards.
Therefore, controls when recognising cards has also been extended and improved.
Now DeckRecognizer include specific extensions for additional constraints imposed by Game Format, Deck Format, release date and art preference. Consequently, all methods used to retrieve cards from CardDb have been updated accordingly, using recognizer settings.
Test suite has been updated accordingly - and all tests re-organised with comments for better code navigation.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This FIX includes:
- improvements to general UI for better rendering;
- full added support to localisation
- CardEditions in ComboBox are now sorted (using getSortedEditions) in descending order, from recent first.
- inverted order of + and - button (IMHO more intuitive)
Fixed Issue in CardManager for Unique Card Filters.
Now, only one entry of card will be returned per-edition, also accounting for Card images.
In other words, Card entry will be selected considering the default Card Art Preference. Therefore, candidate editions will be iterated in order, looking for an entry having a card with an image.
If none could be found, the original first entry (even with no image) will be returned instead.
getBlockFormat becomes also getBlockList, inline with other methods in GameFormat.Collection. DeckManager and CardManager have been updated accordingly.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
Latest version of the UI with expandable panel with options.
Options include Release Date, Card Art Preference, and Block Filter (if available).
This new UI update also fixes some small imperfections in the previous version, with better management of spacing.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
Added tests for new setting w/ CardArtPreference and FIX bug on foil request when no edition is specified.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This method is currently used in CardManager and DeckManager for Block Filter when Historic format are supported in forge. However, now the same method will also be used in Deck Import so this refactoring was very much necessary!
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
BufferedImage (deep) copy procedure applied in CardPicturePanel may not always work when the input image has been originally cropped.
The issue is caused by `image.copyData(null)` which may sometimes work on the original (uncropped) underlying raster.
This patch fixes this issue!
Source: https://stackoverflow.com/a/26894825/2969461