mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- 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:
@@ -229,7 +229,6 @@ public enum TargetingOverlay {
|
||||
endpoints.get(pwAttacker.getUniqueNumber())
|
||||
});
|
||||
}
|
||||
cardsVisualized.add(planeswalker);
|
||||
}
|
||||
for (Card attackingCard : combat.getAttackers()) {
|
||||
List<Card> cards = combat.getBlockers(attackingCard);
|
||||
@@ -306,7 +305,6 @@ public enum TargetingOverlay {
|
||||
|
||||
g2d.translate(startX, startY);
|
||||
g2d.rotate(Math.atan2(ey, ex));
|
||||
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.60f));
|
||||
g2d.setColor(color);
|
||||
g2d.fill(arrow);
|
||||
g2d.setColor(Color.BLACK);
|
||||
@@ -359,8 +357,14 @@ public enum TargetingOverlay {
|
||||
Graphics2D g2d = (Graphics2D) g;
|
||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
|
||||
Color colorOther = FSkin.getColor(FSkin.Colors.CLR_ACTIVE).getColor();
|
||||
Color colorCombat = Color.RED;
|
||||
Color colorOther = FSkin.getColor(FSkin.Colors.CLR_NORMAL_TARGETING_ARROW).getColor();
|
||||
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, colorCombat, arcsCombat);
|
||||
|
||||
@@ -364,7 +364,9 @@ public enum FSkin {
|
||||
CLR_PHASE_ACTIVE_ENABLED (new int[] {70, 190}),
|
||||
CLR_PHASE_ACTIVE_DISABLED (new int[] {70, 210}),
|
||||
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 int[] coords;
|
||||
|
||||
Reference in New Issue
Block a user