From fce213bd8c69ac80cfe9024c25ef7ec39091a02e Mon Sep 17 00:00:00 2001 From: Doug Rimmer Date: Wed, 23 Sep 2020 22:09:10 -0400 Subject: [PATCH] final bug fixes for 6.6.0 --- src/VASL/build/module/map/ASLPieceMover.java | 3 ++- src/VASL/build/module/map/CounterDetailViewer.java | 5 +++-- src/VASL/counters/ASLHighlighter.java | 6 +++--- vasl.iml | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/VASL/build/module/map/ASLPieceMover.java b/src/VASL/build/module/map/ASLPieceMover.java index 81223c0ae..358c114f9 100644 --- a/src/VASL/build/module/map/ASLPieceMover.java +++ b/src/VASL/build/module/map/ASLPieceMover.java @@ -35,6 +35,7 @@ import VASSAL.counters.Properties; import VASSAL.counters.Stack; import VASSAL.tools.LaunchButton; +import VASSAL.tools.image.LabelUtils; import javax.swing.*; import java.awt.*; @@ -369,7 +370,7 @@ public Command _movePieces(Map map, Point p) { // Apply key after move to each moved piece if (map.getMoveKey() != null) { - applyKeyAfterMove(allDraggedPieces, comm, map.getMoveKey()); + comm.append(applyKeyAfterMove(allDraggedPieces, map.getMoveKey())); } tracker.repaint(); diff --git a/src/VASL/build/module/map/CounterDetailViewer.java b/src/VASL/build/module/map/CounterDetailViewer.java index 85703d766..acc277436 100644 --- a/src/VASL/build/module/map/CounterDetailViewer.java +++ b/src/VASL/build/module/map/CounterDetailViewer.java @@ -29,6 +29,7 @@ import VASSAL.counters.Decorator; import VASSAL.counters.GamePiece; import VASSAL.counters.Labeler; +import VASSAL.tools.image.LabelUtils; import VASSAL.counters.Properties; import VASSAL.counters.Stack; import VASSAL.i18n.Resources; @@ -250,7 +251,7 @@ protected void drawGraphics(Graphics g, Point pt, JComponent comp, List 0) { - drawLabel(g, new Point(x, y + 5), text, Labeler.CENTER, Labeler.TOP); + drawLabel(g, new Point(x, y + 5), text, LabelUtils.CENTER, LabelUtils.TOP); } } } @@ -296,7 +297,7 @@ protected void drawText(Graphics g, Point pt, JComponent comp, List p } if (report.length() > 0) { - drawLabel(g, new Point(x, y), report, Labeler.RIGHT, Labeler.BOTTOM); + drawLabel(g, new Point(x, y), report, LabelUtils.RIGHT, LabelUtils.BOTTOM); } } } diff --git a/src/VASL/counters/ASLHighlighter.java b/src/VASL/counters/ASLHighlighter.java index 68250409b..0b8c2728b 100644 --- a/src/VASL/counters/ASLHighlighter.java +++ b/src/VASL/counters/ASLHighlighter.java @@ -24,7 +24,7 @@ import VASSAL.counters.ColoredBorder; import VASSAL.counters.GamePiece; import VASSAL.counters.Labeler; - +import VASSAL.tools.image.LabelUtils; import java.awt.*; import org.w3c.dom.Element; @@ -49,8 +49,8 @@ public void draw(GamePiece p, Graphics g, int x, int y, Component obs, double zo r = p.getParent().bottomPiece().getShape().getBounds(); } y += (int) (zoom * (r.y + r.height + 6)); - Labeler.drawLabel(g, p.getMap().locationName(p.getPosition()), - x, y, f, Labeler.CENTER, Labeler.TOP, + LabelUtils.drawLabel(g, p.getMap().locationName(p.getPosition()), + x, y, f, LabelUtils.CENTER, LabelUtils.TOP, Color.black, Color.white, Color.black); } } diff --git a/vasl.iml b/vasl.iml index dd49caad1..52e95e8cc 100644 --- a/vasl.iml +++ b/vasl.iml @@ -8,9 +8,9 @@ + -