check for new card images when client starts

This commit is contained in:
BetaSteward 2011-08-31 11:28:21 -04:00
parent 0ce1b4b918
commit f9cb39ea7e
6 changed files with 51 additions and 1 deletions

View file

@ -29,6 +29,7 @@ public interface MagePlugins {
boolean isCardPluginLoaded();
boolean isCounterPluginLoaded();
void sortPermanents(Map<String, JComponent> ui, Collection<MagePermanent> permanents);
boolean newImage(Set<Card> allCards);
void downloadImage(Set<Card> allCards);
void downloadSymbols();
int getGamesPlayed();

View file

@ -110,6 +110,13 @@ public class Plugins implements MagePlugins {
if (this.cardPlugin != null) this.cardPlugin.sortPermanents(ui, permanents, sortingOptions);
}
@Override
public boolean newImage(Set<mage.cards.Card> allCards) {
String useDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_USE_DEFAULT, "true");
String path = useDefault.equals("true") ? null : PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_PATH, null);
return this.cardPlugin.newImages(allCards, path);
}
@Override
public void downloadImage(Set<mage.cards.Card> allCards) {
String useDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_USE_DEFAULT, "true");