Skip to content

Commit

Permalink
EDIT: The color chooser now shows the name of the player whose color …
Browse files Browse the repository at this point in the history
…gets changed.
  • Loading branch information
tsaglam committed Nov 13, 2018
1 parent 528cddd commit 7013897
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ public MenuColorsMouseAdapter(int player) {
options = GameOptions.getInstance();
colorChooser = new JColorChooser();
colorChooser.getSelectionModel().addChangeListener(this);
colorChooser.setBorder(BorderFactory.createTitledBorder("Choose Meeple Color"));
paintShop = new PaintShop();
createPreview();

}

// gets called when the ok button is pressed
Expand All @@ -57,6 +55,7 @@ public void actionPerformed(ActionEvent e) {
@Override
public void mousePressed(MouseEvent e) {
colorChooser.setColor(options.getPlayerColor(player));
colorChooser.setBorder(BorderFactory.createTitledBorder("Choose Meeple Color for player " + options.getPlayerName(player)));
JColorChooser.createDialog(null, "Carcassonne", true, colorChooser, this, null).setVisible(true);
}

Expand Down

0 comments on commit 7013897

Please sign in to comment.