diff --git a/megamek/i18n/megamek/client/messages.properties b/megamek/i18n/megamek/client/messages.properties index 716e8df07c4..72973cea8a9 100644 --- a/megamek/i18n/megamek/client/messages.properties +++ b/megamek/i18n/megamek/client/messages.properties @@ -2097,6 +2097,7 @@ Minimap.BuildingHeightLabel=B Minimap.GroundHeightLabel=G Minimap.NoHeightLabel=N Minimap.TotalHeightLabel=T +Minimap.X=X #Mini round report display MiniReportDisplay.Damage=Damage diff --git a/megamek/src/megamek/client/ui/swing/minimap/Minimap.java b/megamek/src/megamek/client/ui/swing/minimap/Minimap.java index 37adb351e8e..257d5eb916e 100644 --- a/megamek/src/megamek/client/ui/swing/minimap/Minimap.java +++ b/megamek/src/megamek/client/ui/swing/minimap/Minimap.java @@ -57,9 +57,7 @@ import java.util.List; import java.util.*; -import static megamek.client.ui.swing.minimap.MinimapUnitSymbols.STRAT_BASERECT; -import static megamek.client.ui.swing.minimap.MinimapUnitSymbols.STRAT_CX; -import static megamek.client.ui.swing.minimap.MinimapUnitSymbols.STRAT_SYMBOLSIZE; +import static megamek.client.ui.swing.minimap.MinimapUnitSymbols.*; import static megamek.common.Terrains.*; /** @@ -711,7 +709,20 @@ private void drawButtons(Graphics g) { default: label = ""; } - g.drawString(label, 17, y0 + 12); + g.drawString(label, 17, y0 + 11); + + // map size + int width = getFontMetrics(g.getFont()).stringWidth(label); + String mapSize = board.getWidth() + " " + Messages.getString("Minimap.X") + " " + board.getHeight(); + int x = 24 + width; + g.drawString(mapSize, x, y0 + 11); + width = getFontMetrics(g.getFont()).stringWidth(mapSize); + x += width + 3; + g.setColor(Color.black); + g.drawLine(x, y0, x, h); + x += 1; + g.setColor(Color.green.darker()); + g.drawLine(x, y0, x, h); } } } @@ -731,10 +742,11 @@ private void paintHeight(Graphics g, Hex h, int x, int y) { height = (h.containsAnyTerrainOf(BUILDING, FUEL_TANK)) ? h.ceiling() : h.floor(); } if (height != 0) { + String sHeight = ((height > -1) && (height < 10)) ? " " + height : height + ""; int baseX = (x * (HEX_SIDE[zoom] + HEX_SIDE_BY_SIN30[zoom])) + leftMargin; int baseY = (((2 * y) + 1 + (x % 2)) * HEX_SIDE_BY_COS30[zoom]) + topMargin; g.setColor(Color.white); - g.drawString(height + "", baseX + 5, baseY + 5); + g.drawString(sHeight, baseX + 5, baseY + 5); } }