Skip to content

Commit

Permalink
Fix typo in get/setAttachArrowTransparency -> Attack
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleet01 committed Jul 21, 2024
1 parent 722ce14 commit 0718379
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions megamek/src/megamek/client/ui/swing/CommonSettingsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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()));
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions megamek/src/megamek/client/ui/swing/GUIPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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);
}

Expand Down
3 changes: 1 addition & 2 deletions megamek/src/megamek/client/ui/swing/util/PlayerColour.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 0718379

Please sign in to comment.