mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Added an attack symbol.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -5743,6 +5743,7 @@ res/images/symbols-13/WU.png -text svneol=unset#image/png
|
|||||||
res/images/symbols-13/X.png -text svneol=unset#image/png
|
res/images/symbols-13/X.png -text svneol=unset#image/png
|
||||||
res/images/symbols-13/Y.png -text svneol=unset#image/png
|
res/images/symbols-13/Y.png -text svneol=unset#image/png
|
||||||
res/images/symbols-13/Z.png -text svneol=unset#image/png
|
res/images/symbols-13/Z.png -text svneol=unset#image/png
|
||||||
|
res/images/symbols-13/attack.png -text svneol=unset#image/png
|
||||||
res/images/symbols-13/slash.png -text svneol=unset#image/png
|
res/images/symbols-13/slash.png -text svneol=unset#image/png
|
||||||
res/lang/de.properties svneol=native#text/plain
|
res/lang/de.properties svneol=native#text/plain
|
||||||
res/lang/en.properties svneol=native#text/plain
|
res/lang/en.properties svneol=native#text/plain
|
||||||
|
|||||||
BIN
res/images/symbols-13/attack.png
Normal file
BIN
res/images/symbols-13/attack.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -185,6 +185,8 @@ public class CardPanel extends JPanel implements CardContainer{
|
|||||||
int width = ManaSymbols.getWidth(gameCard.getManaCost());
|
int width = ManaSymbols.getWidth(gameCard.getManaCost());
|
||||||
ManaSymbols.draw(g, gameCard.getManaCost(), cardXOffset + cardWidth / 2 - width / 2, cardYOffset + cardHeight / 2);
|
ManaSymbols.draw(g, gameCard.getManaCost(), cardXOffset + cardWidth / 2 - width / 2, cardYOffset + cardHeight / 2);
|
||||||
}
|
}
|
||||||
|
if (showCastingCost && !isAnimationPanel && cardWidth < 200 && getCard().isAttacking() )
|
||||||
|
ManaSymbols.drawAttack(g, cardXOffset + cardWidth / 2 - 12, cardYOffset +1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void layout () {
|
public void layout () {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class ManaSymbols {
|
|||||||
static public void loadImages () {
|
static public void loadImages () {
|
||||||
String[] symbols = new String[] {"0", "1", "10", "11", "12", "15", "16", "2", "20", "2W", "2U", "2R", "2G", "2B", "3",
|
String[] symbols = new String[] {"0", "1", "10", "11", "12", "15", "16", "2", "20", "2W", "2U", "2R", "2G", "2B", "3",
|
||||||
"4", "5", "6", "7", "8", "9", "B", "BG", "BR", "G", "GU", "GW", "R", "RG", "RW", "S", "T", "U", "UB",
|
"4", "5", "6", "7", "8", "9", "B", "BG", "BR", "G", "GU", "GW", "R", "RG", "RW", "S", "T", "U", "UB",
|
||||||
"UR", "W", "WB", "WU", "X", "Y", "Z", "slash"};
|
"UR", "W", "WB", "WU", "X", "Y", "Z", "slash", "attack"};
|
||||||
for (String symbol : symbols)
|
for (String symbol : symbols)
|
||||||
manaImages.put(symbol, UI.getImageIcon("res/images/symbols-13/" + symbol + ".png").getImage());
|
manaImages.put(symbol, UI.getImageIcon("res/images/symbols-13/" + symbol + ".png").getImage());
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,11 @@ public class ManaSymbols {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public void drawAttack (Graphics g, int x, int y) {
|
||||||
|
Image image = manaImages.get("attack");
|
||||||
|
g.drawImage(image, x, y, null);
|
||||||
|
}
|
||||||
|
|
||||||
static public int getWidth (String manaCost) {
|
static public int getWidth (String manaCost) {
|
||||||
int width = 0;
|
int width = 0;
|
||||||
StringTokenizer tok = new StringTokenizer(manaCost, " ");
|
StringTokenizer tok = new StringTokenizer(manaCost, " ");
|
||||||
|
|||||||
Reference in New Issue
Block a user