mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* GUI: fixed auto-generated names for AI in new tournament dialog;
This commit is contained in:
parent
1cf57e0840
commit
ac0bb713d7
4 changed files with 6 additions and 12 deletions
|
@ -1,10 +1,3 @@
|
|||
|
||||
|
||||
/*
|
||||
* NewPlayerPanel.java
|
||||
*
|
||||
* Created on 15-Dec-2009, 10:09:46 PM
|
||||
*/
|
||||
package mage.client.table;
|
||||
|
||||
import java.io.File;
|
||||
|
|
|
@ -126,7 +126,7 @@ public class TablePlayerPanel extends javax.swing.JPanel {
|
|||
private void cbPlayerTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPlayerTypeActionPerformed
|
||||
if (getPlayerType() != PlayerType.HUMAN) {
|
||||
this.newPlayerPanel.setVisible(true);
|
||||
this.newPlayerPanel.setPlayerName("Computer " + this.lblPlayerNum.getText().charAt(this.lblPlayerNum.getText().length() - 1));
|
||||
this.newPlayerPanel.setPlayerName(ClientDefaultSettings.computerName + " " + this.lblPlayerNum.getText().charAt(this.lblPlayerNum.getText().length() - 1));
|
||||
}
|
||||
else {
|
||||
this.newPlayerPanel.setVisible(false);
|
||||
|
|
|
@ -10,6 +10,7 @@ package mage.client.table;
|
|||
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.client.SessionHandler;
|
||||
import mage.client.util.ClientDefaultSettings;
|
||||
import mage.players.PlayerType;
|
||||
|
||||
import javax.swing.*;
|
||||
|
@ -136,9 +137,9 @@ public class TournamentPlayerPanel extends javax.swing.JPanel {
|
|||
private void cbPlayerTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPlayerTypeActionPerformed
|
||||
if (this.cbPlayerType.getSelectedItem() != PlayerType.HUMAN) {
|
||||
this.pnlPlayerName.setVisible(true);
|
||||
if (this.txtPlayerName.getText().isEmpty()) {
|
||||
this.txtPlayerName.setText("Computer " + this.lblPlayerNum.getText());
|
||||
}
|
||||
this.txtPlayerName.setText(ClientDefaultSettings.computerName + " " + this.lblPlayerNum.getText().charAt(this.lblPlayerNum.getText().length() - 1));
|
||||
this.txtPlayerName.setEditable(false);
|
||||
this.txtPlayerName.setEnabled(false);
|
||||
} else {
|
||||
this.pnlPlayerName.setVisible(false);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class ClientDefaultSettings {
|
|||
handScalingFactor = 1.3;
|
||||
deckPath = "";
|
||||
otherPlayerIndex = "1"; // combobox default, example: 0: Human, 1: Computer - mad, 2: Computer - Draft Bot
|
||||
computerName = "computer";
|
||||
computerName = "Computer";
|
||||
dimensions = new CardDimensions(cardScalingFactor);
|
||||
dimensionsEnlarged = new CardDimensions(cardScalingFactorEnlarged);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue