Skip to content

Commit

Permalink
Merge pull request #12707 from riverwanderer/12706-side-related-initi…
Browse files Browse the repository at this point in the history
…al-states

12706-keep the "retire" button disabled unless a game is running.
  • Loading branch information
uckelman authored Sep 16, 2023
2 parents f669fc5 + 7ac4b20 commit 6c92c34
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public PlayerRoster() {
"",
e -> launch()
));
getLaunchButton().setVisible(false);
getLaunchButton().setEnabled(false); // not usuable without a game
// getLaunchButton().setVisible(false);
retireButton = getLaunchButton(); // for compatibility

setShowDisabledOptions(false); //AbstractToolbarItem
Expand Down Expand Up @@ -451,7 +452,8 @@ public void setup(boolean gameStarting) {
GameModule.setTempUserId(null);
players.clear();
}
getLaunchButton().setVisible(gameStarting && getMySide() != null);
// getLaunchButton().setVisible(gameStarting && getMySide() != null);
getLaunchButton().setEnabled(gameStarting);
pickedSide = false;
}

Expand Down Expand Up @@ -480,7 +482,9 @@ public void finish() {
a.execute();
GameModule.getGameModule().getServer().sendToOthers(a);
}
getLaunchButton().setVisible(getMySide() != null);
// button is enabled / disabled at start and end of games.
// not clear what purpose is served by adjusting button visibility here
// getLaunchButton().setVisible(getMySide() != null);
pickedSide = true;
}

Expand Down

0 comments on commit 6c92c34

Please sign in to comment.