From 07183796133feb1a06856ac5e9fdd92f30b638d1 Mon Sep 17 00:00:00 2001 From: sleet01 Date: Sun, 21 Jul 2024 01:35:41 -0700 Subject: [PATCH] Fix typo in get/setAttachArrowTransparency -> Attack --- .../src/megamek/client/ui/swing/CommonSettingsDialog.java | 6 +++--- megamek/src/megamek/client/ui/swing/GUIPreferences.java | 4 ++-- .../megamek/client/ui/swing/boardview/MovementSprite.java | 8 ++++---- .../src/megamek/client/ui/swing/util/PlayerColour.java | 3 +-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/megamek/src/megamek/client/ui/swing/CommonSettingsDialog.java b/megamek/src/megamek/client/ui/swing/CommonSettingsDialog.java index 32480cb76a5..df67eea8062 100644 --- a/megamek/src/megamek/client/ui/swing/CommonSettingsDialog.java +++ b/megamek/src/megamek/client/ui/swing/CommonSettingsDialog.java @@ -715,7 +715,7 @@ private JPanel getGameBoardPanel() { addLineSpacer(comps); - SpinnerNumberModel mAttackArrowTransparency = new SpinnerNumberModel(GUIP.getAttachArrowTransparency(), 0, 256, 1); + SpinnerNumberModel mAttackArrowTransparency = new SpinnerNumberModel(GUIP.getAttackArrowTransparency(), 0, 256, 1); attackArrowTransparency = new JSpinner(mAttackArrowTransparency); attackArrowTransparency.setMaximumSize(new Dimension(150, 40)); JLabel attackArrowTransparencyLabel = new JLabel(Messages.getString("CommonSettingsDialog.attackArrowTransparency")); @@ -1993,7 +1993,7 @@ protected void cancelAction() { csbLowFoliageColor.setColour(GUIP.getLowFoliageColor()); csbMapsheetColor.setColour(GUIP.getMapsheetColor()); - attackArrowTransparency.setValue(GUIP.getAttachArrowTransparency()); + attackArrowTransparency.setValue(GUIP.getAttackArrowTransparency()); ecmTransparency.setValue(GUIP.getECMTransparency()); buttonsPerRow.setText(String.format("%d", GUIP.getButtonsPerRow())); playersRemainingToShow.setText(String.format("%d", GUIP.getPlayersRemainingToShow())); @@ -2182,7 +2182,7 @@ protected void okAction() { GUIP.setLowFoliageColor(csbLowFoliageColor.getColour()); GUIP.setMapsheetColor(csbMapsheetColor.getColour()); - GUIP.setAttachArrowTransparency((Integer) attackArrowTransparency.getValue()); + GUIP.setAttackArrowTransparency((Integer) attackArrowTransparency.getValue()); GUIP.setECMTransparency((Integer) ecmTransparency.getValue()); try { diff --git a/megamek/src/megamek/client/ui/swing/GUIPreferences.java b/megamek/src/megamek/client/ui/swing/GUIPreferences.java index 6702615b50d..f5b3541702a 100644 --- a/megamek/src/megamek/client/ui/swing/GUIPreferences.java +++ b/megamek/src/megamek/client/ui/swing/GUIPreferences.java @@ -2762,11 +2762,11 @@ public void setUnitOverviewTextColor(Color color) { store.setValue(BOARD_UNIT_TEXT_COLOR, getColorString(color)); } - public int getAttachArrowTransparency() { + public int getAttackArrowTransparency() { return getInt(BOARD_ATTACK_ARROW_TRANSPARENCY); } - public void setAttachArrowTransparency(int i) { + public void setAttackArrowTransparency(int i) { store.setValue(BOARD_ATTACK_ARROW_TRANSPARENCY, i); } diff --git a/megamek/src/megamek/client/ui/swing/boardview/MovementSprite.java b/megamek/src/megamek/client/ui/swing/boardview/MovementSprite.java index 0d6788807e5..f9567248e79 100644 --- a/megamek/src/megamek/client/ui/swing/boardview/MovementSprite.java +++ b/megamek/src/megamek/client/ui/swing/boardview/MovementSprite.java @@ -20,8 +20,8 @@ * long diagonal lines. * * Appears as an arrow pointing to the hex this entity will move to based on - * current movement vectors. - * + * current movement vectors. + * * TODO: Different color depending upon whether * entity has already moved this turn */ @@ -80,13 +80,13 @@ public MovementSprite(BoardView boardView1, Entity e, int[] v, Color col, boolea // red if offboard if (!this.bv.game.getBoard().contains(end)) { int colour = 0xff0000; // red - int transparency = GUIP.getAttachArrowTransparency(); + int transparency = GUIP.getAttackArrowTransparency(); moveColor = new Color(colour | (transparency << 24), true); } // dark gray if done if (en.isDone()) { int colour = 0x696969; // gray - int transparency = GUIP.getAttachArrowTransparency(); + int transparency = GUIP.getAttackArrowTransparency(); moveColor = new Color(colour | (transparency << 24), true); } diff --git a/megamek/src/megamek/client/ui/swing/util/PlayerColour.java b/megamek/src/megamek/client/ui/swing/util/PlayerColour.java index 0eb82c95776..68ad1249f26 100644 --- a/megamek/src/megamek/client/ui/swing/util/PlayerColour.java +++ b/megamek/src/megamek/client/ui/swing/util/PlayerColour.java @@ -18,7 +18,6 @@ */ package megamek.client.ui.swing.util; -import megamek.MMConstants; import megamek.client.ui.swing.GUIPreferences; import megamek.common.Messages; import org.apache.logging.log4j.LogManager; @@ -103,7 +102,7 @@ public Color getColour() { public Color getColour(boolean allowTransparency) { if (allowTransparency) { - int transparency = GUIP.getAttachArrowTransparency(); + int transparency = GUIP.getAttackArrowTransparency(); return new Color(getHex() | (transparency << 24), true); } else { return new Color(getHex());