Search in sources :

Example 41 with CardView

use of mage.view.CardView in project mage by magefree.

the class MageActionCallback method enlargeCard.

/**
 * Show the big card image on mouse position while hovering over a card
 *
 * @param showAlternative defines if the original image (if it's a copied
 *                        card) or the opposite side of a transformable card will be shown
 */
public void enlargeCard(EnlargeMode showAlternative) {
    if (enlargedWindowState == EnlargedWindowState.CLOSED) {
        this.enlargeMode = showAlternative;
        CardView cardView = null;
        if (popupData != null) {
            cardView = popupData.getCard();
        }
        if (this.popupTextWindowOpen) {
            hideTooltipPopup();
        }
        if (cardView != null) {
            if (cardView.isToRotate()) {
                enlargedWindowState = EnlargedWindowState.ROTATED;
            } else {
                enlargedWindowState = EnlargedWindowState.NORMAL;
            }
            displayEnlargedCard(cardView, popupData);
        }
    }
}
Also used : CardView(mage.view.CardView)

Aggregations

CardView (mage.view.CardView)41 List (java.util.List)15 MageCard (mage.cards.MageCard)10 CardInfo (mage.cards.repository.CardInfo)9 Card (mage.cards.Card)6 DeckCardInfo (mage.cards.decks.DeckCardInfo)5 java.util (java.util)4 BigCard (mage.client.cards.BigCard)4 CardIconRenderSettings (mage.abilities.icon.CardIconRenderSettings)3 GameView (mage.view.GameView)3 PlayerView (mage.view.PlayerView)3 SimpleCardView (mage.view.SimpleCardView)3 Test (org.junit.Test)3 java.awt (java.awt)2 java.awt.event (java.awt.event)2 ArrayList (java.util.ArrayList)2 Entry (java.util.Map.Entry)2 Matcher (java.util.regex.Matcher)2 Pattern (java.util.regex.Pattern)2 javax.swing (javax.swing)2