mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
Single setPlayerName method.
This commit is contained in:
parent
9df5c9ba68
commit
adcd9d84c6
2 changed files with 1 additions and 7 deletions
|
@ -46,12 +46,6 @@ public class NewPlayerPanel extends javax.swing.JPanel {
|
||||||
this.txtPlayerName.setEnabled(false);
|
this.txtPlayerName.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlayerName(String playerName, boolean editable, boolean enabled) {
|
|
||||||
this.txtPlayerName.setText(playerName);
|
|
||||||
this.txtPlayerName.setEditable(editable);
|
|
||||||
this.txtPlayerName.setEnabled(enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void playerLoadDeck() {
|
protected void playerLoadDeck() {
|
||||||
String lastFolder = MageFrame.getPreferences().get("lastDeckFolder", "");
|
String lastFolder = MageFrame.getPreferences().get("lastDeckFolder", "");
|
||||||
if (!lastFolder.isEmpty()) {
|
if (!lastFolder.isEmpty()) {
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class TablePlayerPanel extends javax.swing.JPanel {
|
||||||
private void cbPlayerTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPlayerTypeActionPerformed
|
private void cbPlayerTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPlayerTypeActionPerformed
|
||||||
if (getPlayerType() != PlayerType.HUMAN) {
|
if (getPlayerType() != PlayerType.HUMAN) {
|
||||||
this.newPlayerPanel.setVisible(true);
|
this.newPlayerPanel.setVisible(true);
|
||||||
this.newPlayerPanel.setPlayerName("Computer " + this.lblPlayerNum.getText().charAt(this.lblPlayerNum.getText().length() - 1),true,true);
|
this.newPlayerPanel.setPlayerName("Computer " + this.lblPlayerNum.getText().charAt(this.lblPlayerNum.getText().length() - 1));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.newPlayerPanel.setVisible(false);
|
this.newPlayerPanel.setVisible(false);
|
||||||
|
|
Loading…
Reference in a new issue