UI changes + created lite mode (client without images) for remote desktop work

This commit is contained in:
BetaSteward 2011-06-16 14:56:35 -04:00
parent e40caef07b
commit 89770db58e
12 changed files with 150 additions and 85 deletions

View file

@ -592,7 +592,9 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
@Override
public Image getImage() {
return ImageCache.getImageOriginal(gameCard);
if (this.hasImage)
return ImageCache.getImageOriginal(gameCard);
return null;
}
@Override

View file

@ -79,9 +79,9 @@ public class CardPluginImpl implements CardPlugin {
}
@Override
public MagePermanent getMagePermanent(PermanentView permanent, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil) {
public MagePermanent getMagePermanent(PermanentView permanent, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil, boolean loadImage) {
boolean foil = canBeFoil && (new Random()).nextInt(5) == 0;
CardPanel cardPanel = new CardPanel(permanent, gameId, true, callback, foil);
CardPanel cardPanel = new CardPanel(permanent, gameId, loadImage, callback, foil);
cardPanel.setCardBounds(0, 0, dimension.width, dimension.height);
boolean implemented = !permanent.getRarity().equals(mage.Constants.Rarity.NA);
cardPanel.setShowCastingCost(implemented);
@ -89,9 +89,9 @@ public class CardPluginImpl implements CardPlugin {
}
@Override
public MagePermanent getMageCard(CardView permanent, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil) {
public MagePermanent getMageCard(CardView permanent, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil, boolean loadImage) {
boolean foil = canBeFoil && (new Random()).nextInt(5) == 0;
CardPanel cardPanel = new CardPanel(permanent, gameId, true, callback, foil);
CardPanel cardPanel = new CardPanel(permanent, gameId, loadImage, callback, foil);
cardPanel.setCardBounds(0, 0, dimension.width, dimension.height);
boolean implemented = !permanent.getRarity().equals(mage.Constants.Rarity.NA);
cardPanel.setShowCastingCost(implemented);

View file

@ -52,11 +52,11 @@ public class RateThread extends Thread {
Card card1 = getRandomUniqueNonLandCard(null);
Card card2 = getRandomUniqueNonLandCard(card1);
mageCard1 = impl.getMageCard(new CardView(card1), cardDimension, UUID.randomUUID(), new RateCallback(card1, card2, this, bigCard), false);
mageCard1 = impl.getMageCard(new CardView(card1), cardDimension, UUID.randomUUID(), new RateCallback(card1, card2, this, bigCard), false, true);
mageCard1.setCardBounds(bigCardDimension.frameWidth + 80, 10, dimensions.frameWidth, dimensions.frameHeight);
frame.add(mageCard1);
mageCard2 = impl.getMageCard(new CardView(card2), cardDimension, UUID.randomUUID(), new RateCallback(card2, card1, this, bigCard), false);
mageCard2 = impl.getMageCard(new CardView(card2), cardDimension, UUID.randomUUID(), new RateCallback(card2, card1, this, bigCard), false, true);
mageCard2.setCardBounds(bigCardDimension.frameWidth + 80 + dimensions.frameWidth + 30, 10, dimensions.frameWidth, dimensions.frameHeight);
frame.add(mageCard2);