- Non-combat and combat targeting arrows are now themed (use CLR_NORMAL_TARGETING_ARROW and CLR_EFFECT_TARGETING_ARROW).

- Default theme is updated to include a demonstration of where and how to specify the targeting arrow colors.
- Themes which do not have the targeting arrow colors specified will use the default red color with 60% opacity for the combat arrow and CLR_ACTIVE with 60% opacity (as before) for the non-combat arrow.
- Combat targeting arrow opacity is now defined by the theme, not hard-coded.
This commit is contained in:
Agetian
2014-02-15 17:08:30 +00:00
parent 030f6c3939
commit bcac77bd0d
3 changed files with 11 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 KiB

After

Width:  |  Height:  |  Size: 636 KiB

View File

@@ -229,7 +229,6 @@ public enum TargetingOverlay {
endpoints.get(pwAttacker.getUniqueNumber()) endpoints.get(pwAttacker.getUniqueNumber())
}); });
} }
cardsVisualized.add(planeswalker);
} }
for (Card attackingCard : combat.getAttackers()) { for (Card attackingCard : combat.getAttackers()) {
List<Card> cards = combat.getBlockers(attackingCard); List<Card> cards = combat.getBlockers(attackingCard);
@@ -306,7 +305,6 @@ public enum TargetingOverlay {
g2d.translate(startX, startY); g2d.translate(startX, startY);
g2d.rotate(Math.atan2(ey, ex)); g2d.rotate(Math.atan2(ey, ex));
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.60f));
g2d.setColor(color); g2d.setColor(color);
g2d.fill(arrow); g2d.fill(arrow);
g2d.setColor(Color.BLACK); g2d.setColor(Color.BLACK);
@@ -359,8 +357,14 @@ public enum TargetingOverlay {
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Color colorOther = FSkin.getColor(FSkin.Colors.CLR_ACTIVE).getColor(); Color colorOther = FSkin.getColor(FSkin.Colors.CLR_NORMAL_TARGETING_ARROW).getColor();
Color colorCombat = Color.RED; if (colorOther.getAlpha() == 0) {
colorOther = FSkin.getColor(FSkin.Colors.CLR_ACTIVE).alphaColor(153).getColor();
}
Color colorCombat = FSkin.getColor(FSkin.Colors.CLR_COMBAT_TARGETING_ARROW).getColor();
if (colorCombat.getAlpha() == 0) {
colorCombat = new Color(255, 0, 0, 153); // default color if the theme does not have it defined
}
drawArcs(g2d, colorOther, arcsOther); drawArcs(g2d, colorOther, arcsOther);
drawArcs(g2d, colorCombat, arcsCombat); drawArcs(g2d, colorCombat, arcsCombat);

View File

@@ -364,7 +364,9 @@ public enum FSkin {
CLR_PHASE_ACTIVE_ENABLED (new int[] {70, 190}), CLR_PHASE_ACTIVE_ENABLED (new int[] {70, 190}),
CLR_PHASE_ACTIVE_DISABLED (new int[] {70, 210}), CLR_PHASE_ACTIVE_DISABLED (new int[] {70, 210}),
CLR_THEME2 (new int[] {70, 230}), CLR_THEME2 (new int[] {70, 230}),
CLR_OVERLAY (new int[] {70, 250}); CLR_OVERLAY (new int[] {70, 250}),
CLR_COMBAT_TARGETING_ARROW (new int[] {70, 270}),
CLR_NORMAL_TARGETING_ARROW (new int[] {70, 290});
private Color color; private Color color;
private int[] coords; private int[] coords;