forked from External/mage
Made images path configurable. Fixed Issue 36.
This commit is contained in:
parent
2e92da3259
commit
ef0a73f26d
10 changed files with 196 additions and 49 deletions
|
|
@ -7,6 +7,7 @@ import mage.client.MageFrame;
|
|||
import mage.client.cards.BigCard;
|
||||
import mage.client.cards.Card;
|
||||
import mage.client.cards.Permanent;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.client.plugins.MagePlugins;
|
||||
import mage.client.plugins.adapters.MageActionCallback;
|
||||
import mage.client.util.Config;
|
||||
|
|
@ -108,12 +109,16 @@ public class Plugins implements MagePlugins {
|
|||
|
||||
@Override
|
||||
public void downloadImage(Set<mage.cards.Card> allCards) {
|
||||
if (this.cardPlugin != null) this.cardPlugin.downloadImages(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);
|
||||
if (this.cardPlugin != null) this.cardPlugin.downloadImages(allCards, path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadSymbols() {
|
||||
if (this.cardPlugin != null) this.cardPlugin.downloadSymbols();
|
||||
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);
|
||||
if (this.cardPlugin != null) this.cardPlugin.downloadSymbols(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue