Skip to content

Commit

Permalink
update button to apply any deployment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronekochomusuke committed Nov 26, 2023
1 parent ab56dc6 commit 966f32d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion megamek/i18n/megamek/client/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ CustomMechDialog.labDeploymentWidth=Deployment Zone Width:
CustomMechDialog.labDeploymentWidthTip=Deployment Zone width, in hexes
CustomMechDialog.labDeploymentAnyNW=Deployment Any NW corner:
CustomMechDialog.labDeploymentAnySE=Deployment Any SE corner:
CustomMechDialog.BtnDeploymentAnyApplyRulerCoords=Apply ruler coords for Deployment Any corners
CustomMechDialog.BtnDeploymentApply=Apply Deployment
CustomMechDialog.labDeployShutdown=Shutdown
CustomMechDialog.labDeployProne=Prone
CustomMechDialog.labDeployHullDown=Hull Down
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private JPanel deploymentParametersPanel() {
result.add(spinStartingAnySEx, GBC.std());
result.add(spinStartingAnySEy, GBC.eol());

JButton btnApplyRuler = new JButton(Messages.getString("CustomMechDialog.BtnDeploymentAnyApplyRulerCoords"));
JButton btnApplyRuler = new JButton(Messages.getString("CustomMechDialog.BtnDeploymentApply"));
btnApplyRuler.addActionListener(e -> previewGameApplyRuler());
result.add(btnApplyRuler, GBC.eol());

Expand All @@ -304,6 +304,10 @@ private void previewGameApplyRuler() {
spinStartingAnySEy.setValue(y + 1);
client.sendPlayerInfo();
}

player.setStartingPos(currentPlayerStartPos);
player.setStartOffset(getStartOffset());
player.setStartWidth(getStartWidth());
}

private JPanel initiativeSection() {
Expand Down

0 comments on commit 966f32d

Please sign in to comment.