mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
* GUI: added card icon for face down permanents;
This commit is contained in:
parent
c0b4790c4d
commit
12aa3b82b8
6 changed files with 52 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-reply-fill" viewBox="0 0 16 16">
|
||||
<path d="M5.921 11.9 1.353 8.62a.719.719 0 0 1 0-1.238L5.921 4.1A.716.716 0 0 1 7 4.719V6c1.5 0 6 0 7 8-2.5-4.5-7-4-7-4v1.281c0 .56-.606.898-1.079.62z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 291 B |
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||||
<path d="M6.1,11.1L0.8,7.3C0.4,7.1,0.3,6.6,0.5,6.2C0.6,6.1,0.7,6,0.8,5.9l5.3-3.8C6.5,1.9,7,2,7.2,2.4c0.1,0.1,0.1,0.3,0.1,0.4v1.5
|
||||
c1.7,0,6.9,0,8.1,9.3c-2.9-5.2-8.1-4.6-8.1-4.6v1.5C7.4,11.1,6.7,11.5,6.1,11.1L6.1,11.1z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 575 B |
|
@ -10,6 +10,7 @@ import mage.abilities.SpellAbility;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.icon.CardIcon;
|
||||
import mage.abilities.icon.other.FaceDownStatusIcon;
|
||||
import mage.abilities.keyword.AftermathAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.mock.MockCard;
|
||||
|
@ -415,9 +416,15 @@ public class CardView extends SimpleCardView {
|
|||
}
|
||||
|
||||
// card icons for permanents on battlefield
|
||||
// abilities
|
||||
permanent.getAbilities(game).forEach(ability -> {
|
||||
this.cardIcons.addAll(ability.getIcons(game));
|
||||
});
|
||||
// other
|
||||
if (permanent.isFaceDown(game)) {
|
||||
this.cardIcons.add(FaceDownStatusIcon.instance);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (card.isCopy()) {
|
||||
this.mageObjectType = MageObjectType.COPY_CARD;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package mage.abilities.icon;
|
||||
|
||||
/**
|
||||
* For GUI: different icons category can go to different position/panels on the card
|
||||
*
|
||||
* @author JayDi85
|
||||
*/
|
||||
public enum CardIconCategory {
|
||||
|
|
|
@ -31,6 +31,8 @@ public enum CardIconType {
|
|||
ABILITY_VIGILANCE("prepared/eye.svg", CardIconCategory.ABILITY, 100),
|
||||
ABILITY_CLASS_LEVEL("prepared/hexagon-fill.svg", CardIconCategory.ABILITY, 100),
|
||||
//
|
||||
OTHER_FACEDOWN("prepared/reply-fill.svg", CardIconCategory.ABILITY, 100),
|
||||
//
|
||||
SYSTEM_COMBINED("prepared/square-fill.svg", CardIconCategory.SYSTEM, 1000), // inner usage, must use last order
|
||||
SYSTEM_DEBUG("prepared/link.svg", CardIconCategory.SYSTEM, 1000); // used for test render dialog
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package mage.abilities.icon.other;
|
||||
|
||||
import mage.abilities.icon.CardIcon;
|
||||
import mage.abilities.icon.CardIconType;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public enum FaceDownStatusIcon implements CardIcon {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public CardIconType getIconType() {
|
||||
return CardIconType.OTHER_FACEDOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHint() {
|
||||
return "Card is face down";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CardIcon copy() {
|
||||
return instance;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue