mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Merge origin/master
This commit is contained in:
commit
4a8af2b4d2
211 changed files with 4090 additions and 516 deletions
|
|
@ -32,6 +32,7 @@ import java.awt.event.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.net.SocketException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
@ -726,6 +727,12 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
currentConnection.setPassword(password);
|
currentConnection.setPassword(password);
|
||||||
currentConnection.setHost(server);
|
currentConnection.setHost(server);
|
||||||
currentConnection.setPort(port);
|
currentConnection.setPort(port);
|
||||||
|
String allMAC = "";
|
||||||
|
try {
|
||||||
|
allMAC = currentConnection.getMAC();
|
||||||
|
} catch (SocketException ex) {
|
||||||
|
}
|
||||||
|
currentConnection.setUserIdStr(System.getProperty("user.name") + ":" + System.getProperty("os.name") + ":" + MagePreferences.getUserNames() + ":" + allMAC);
|
||||||
currentConnection.setProxyType(proxyType);
|
currentConnection.setProxyType(proxyType);
|
||||||
currentConnection.setProxyHost(proxyServer);
|
currentConnection.setProxyHost(proxyServer);
|
||||||
currentConnection.setProxyPort(proxyPort);
|
currentConnection.setProxyPort(proxyPort);
|
||||||
|
|
@ -1034,7 +1041,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
if (window instanceof DeckEditorPane) {
|
if (window instanceof DeckEditorPane) {
|
||||||
DeckEditorPane deckEditorPane = (DeckEditorPane) window;
|
DeckEditorPane deckEditorPane = (DeckEditorPane) window;
|
||||||
if (deckEditorPane.getDeckEditorMode() == DeckEditorMode.LIMITED_BUILDING
|
if (deckEditorPane.getDeckEditorMode() == DeckEditorMode.LIMITED_BUILDING
|
||||||
|| deckEditorPane.getDeckEditorMode() == DeckEditorMode.SIDEBOARDING) {
|
|| deckEditorPane.getDeckEditorMode() == DeckEditorMode.SIDEBOARDING
|
||||||
|
|| deckEditorPane.getDeckEditorMode() == DeckEditorMode.VIEW_LIMITED_DECK) {
|
||||||
deckEditorPane.removeFrame();
|
deckEditorPane.removeFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1044,7 +1052,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
|
|
||||||
public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID tableId, int time) {
|
public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID tableId, int time) {
|
||||||
String name;
|
String name;
|
||||||
if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING) {
|
if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING || mode == DeckEditorMode.VIEW_LIMITED_DECK) {
|
||||||
name = "Deck Editor - " + tableId.toString();
|
name = "Deck Editor - " + tableId.toString();
|
||||||
} else {
|
} else {
|
||||||
if (deck != null) {
|
if (deck != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,16 @@
|
||||||
package mage.client.cards;
|
package mage.client.cards;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.event.KeyAdapter;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.awt.event.MouseAdapter;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import javax.swing.*;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.MageCard;
|
import mage.cards.MageCard;
|
||||||
import mage.cards.decks.DeckCardInfo;
|
import mage.cards.decks.DeckCardInfo;
|
||||||
|
|
@ -21,18 +32,6 @@ import mage.view.CardsView;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.mage.card.arcane.CardRenderer;
|
import org.mage.card.arcane.CardRenderer;
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.awt.*;
|
|
||||||
import java.awt.event.KeyAdapter;
|
|
||||||
import java.awt.event.KeyEvent;
|
|
||||||
import java.awt.event.MouseAdapter;
|
|
||||||
import java.awt.event.MouseEvent;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by StravantUser on 2016-09-20.
|
* Created by StravantUser on 2016-09-20.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1137,6 +1136,9 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
||||||
--col2;
|
--col2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// avoids a null ref issue but only deals with symptom of problem. not sure how it gets to this state ever. see issue #3197
|
||||||
|
// if (selectionDragStartCards == null) return;
|
||||||
|
|
||||||
int curY = COUNT_LABEL_HEIGHT;
|
int curY = COUNT_LABEL_HEIGHT;
|
||||||
for (int rowIndex = 0; rowIndex < cardGrid.size(); ++rowIndex) {
|
for (int rowIndex = 0; rowIndex < cardGrid.size(); ++rowIndex) {
|
||||||
int stackStartIndex;
|
int stackStartIndex;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,8 @@ public final class Constants {
|
||||||
|
|
||||||
FREE_BUILDING,
|
FREE_BUILDING,
|
||||||
LIMITED_BUILDING,
|
LIMITED_BUILDING,
|
||||||
SIDEBOARDING
|
SIDEBOARDING,
|
||||||
|
VIEW_LIMITED_DECK
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SortBy {
|
public enum SortBy {
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ public class DeckEditorPane extends MagePane {
|
||||||
public void show(DeckEditorMode mode, Deck deck, String name, UUID tableId, int time) {
|
public void show(DeckEditorMode mode, Deck deck, String name, UUID tableId, int time) {
|
||||||
if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING) {
|
if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING) {
|
||||||
this.setTitle("Deck Editor - " + tableId.toString());
|
this.setTitle("Deck Editor - " + tableId.toString());
|
||||||
|
} else if (mode == DeckEditorMode.VIEW_LIMITED_DECK) {
|
||||||
|
this.setTitle("Deck Editor - Current Deck");
|
||||||
} else if (deck != null) {
|
} else if (deck != null) {
|
||||||
this.setTitle("Deck Editor - " + deck.getName());
|
this.setTitle("Deck Editor - " + deck.getName());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,24 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
||||||
this.deckArea.showSideboard(true);
|
this.deckArea.showSideboard(true);
|
||||||
this.txtTimeRemaining.setVisible(false);
|
this.txtTimeRemaining.setVisible(false);
|
||||||
break;
|
break;
|
||||||
|
case VIEW_LIMITED_DECK:
|
||||||
|
this.btnExit.setVisible(true);
|
||||||
|
this.btnSave.setVisible(true);
|
||||||
|
this.btnAddLand.setVisible(false);
|
||||||
|
this.btnGenDeck.setVisible(false);
|
||||||
|
this.btnImport.setVisible(false);
|
||||||
|
this.btnLoad.setVisible(false);
|
||||||
|
this.btnNew.setVisible(false);
|
||||||
|
this.btnSubmit.setVisible(false);
|
||||||
|
this.btnSubmitTimer.setVisible(false);
|
||||||
|
this.cardSelector.loadCards(this.bigCard);
|
||||||
|
this.cardSelector.setVisible(false);
|
||||||
|
this.deckArea.setOrientation(/*limitedBuildingOrientation = */true);
|
||||||
|
this.deckArea.showSideboard(true);
|
||||||
|
this.lblDeckName.setVisible(false);
|
||||||
|
this.txtDeckName.setVisible(false);
|
||||||
|
this.txtTimeRemaining.setVisible(false);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
init();
|
init();
|
||||||
this.deckArea.setDeckEditorMode(mode);
|
this.deckArea.setDeckEditorMode(mode);
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ import java.util.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
|
|
||||||
import mage.cards.decks.Deck;
|
import mage.cards.decks.Deck;
|
||||||
import mage.cards.decks.importer.DeckImporterUtil;
|
import mage.cards.decks.importer.DeckImporterUtil;
|
||||||
import mage.cards.repository.ExpansionInfo;
|
import mage.cards.repository.ExpansionInfo;
|
||||||
|
|
@ -625,7 +626,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()),
|
DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()),
|
||||||
tOptions.getPassword())) {
|
tOptions.getPassword())) {
|
||||||
for (TournamentPlayerPanel player : players) {
|
for (TournamentPlayerPanel player : players) {
|
||||||
if (!player.getPlayerType().getSelectedItem().toString().equals("Human")) {
|
if (player.getPlayerType().getSelectedItem() != PlayerType.HUMAN) {
|
||||||
if (!player.joinTournamentTable(roomId, table.getTableId(), DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()))) {
|
if (!player.joinTournamentTable(roomId, table.getTableId(), DeckImporterUtil.importDeck(this.player1Panel.getDeckFile()))) {
|
||||||
// error message must be send by sever
|
// error message must be send by sever
|
||||||
SessionHandler.removeTable(roomId, table.getTableId());
|
SessionHandler.removeTable(roomId, table.getTableId());
|
||||||
|
|
@ -970,6 +971,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
* set the tournament settings from java prefs
|
* set the tournament settings from java prefs
|
||||||
*/
|
*/
|
||||||
int currentSettingVersion = 0;
|
int currentSettingVersion = 0;
|
||||||
|
|
||||||
private void setTournamentSettingsFromPrefs(int version) {
|
private void setTournamentSettingsFromPrefs(int version) {
|
||||||
currentSettingVersion = version;
|
currentSettingVersion = version;
|
||||||
String versionStr = "";
|
String versionStr = "";
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ import mage.client.util.GUISizeHelper;
|
||||||
import mage.client.util.audio.AudioManager;
|
import mage.client.util.audio.AudioManager;
|
||||||
import mage.client.util.gui.TableUtil;
|
import mage.client.util.gui.TableUtil;
|
||||||
import mage.client.util.gui.countryBox.CountryCellRenderer;
|
import mage.client.util.gui.countryBox.CountryCellRenderer;
|
||||||
|
import mage.players.PlayerType;
|
||||||
import mage.remote.Session;
|
import mage.remote.Session;
|
||||||
import mage.view.SeatView;
|
import mage.view.SeatView;
|
||||||
import mage.view.TableView;
|
import mage.view.TableView;
|
||||||
|
|
@ -437,6 +438,7 @@ class UpdateSeatsTask extends SwingWorker<Void, TableView> {
|
||||||
AudioManager.playPlayerJoinedTable();
|
AudioManager.playPlayerJoinedTable();
|
||||||
} else {
|
} else {
|
||||||
MageTray.instance.displayMessage("A player left your game.");
|
MageTray.instance.displayMessage("A player left your game.");
|
||||||
|
AudioManager.playPlayerLeft();
|
||||||
}
|
}
|
||||||
MageTray.instance.blink();
|
MageTray.instance.blink();
|
||||||
}
|
}
|
||||||
|
|
@ -450,7 +452,7 @@ class UpdateSeatsTask extends SwingWorker<Void, TableView> {
|
||||||
int playerCount = 0;
|
int playerCount = 0;
|
||||||
if (tableView != null) {
|
if (tableView != null) {
|
||||||
for (SeatView seatView : tableView.getSeats()) {
|
for (SeatView seatView : tableView.getSeats()) {
|
||||||
if (seatView.getPlayerId() != null && seatView.getPlayerType().equals("Human")) {
|
if (seatView.getPlayerId() != null && seatView.getPlayerType() == PlayerType.HUMAN) {
|
||||||
playerCount++;
|
playerCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -472,6 +472,17 @@ public class PlayAreaPanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
popupMenu.addSeparator();
|
||||||
|
|
||||||
|
menuItem = new JMenuItem("<html>View current deck");
|
||||||
|
menuItem.setMnemonic(KeyEvent.VK_V);
|
||||||
|
popupMenu.add(menuItem);
|
||||||
|
|
||||||
|
// View limited deck
|
||||||
|
menuItem.addActionListener(e -> {
|
||||||
|
SessionHandler.sendPlayerAction(PlayerAction.VIEW_LIMITED_DECK, gameId, null);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addPopupMenuWatcher() {
|
private void addPopupMenuWatcher() {
|
||||||
|
|
|
||||||
|
|
@ -324,6 +324,13 @@ public class CallbackClientImpl implements CallbackClient {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VIEW_LIMITED_DECK: {
|
||||||
|
TableClientMessage message = (TableClientMessage) callback.getData();
|
||||||
|
DeckView deckView = message.getDeck();
|
||||||
|
Deck deck = DeckUtil.construct(deckView);
|
||||||
|
viewLimitedDeck(deck, message.getTableId(), message.getTime());
|
||||||
|
break;
|
||||||
|
}
|
||||||
case CONSTRUCT: {
|
case CONSTRUCT: {
|
||||||
TableClientMessage message = (TableClientMessage) callback.getData();
|
TableClientMessage message = (TableClientMessage) callback.getData();
|
||||||
DeckView deckView = message.getDeck();
|
DeckView deckView = message.getDeck();
|
||||||
|
|
@ -512,6 +519,10 @@ public class CallbackClientImpl implements CallbackClient {
|
||||||
frame.showDeckEditor(DeckEditorMode.LIMITED_BUILDING, deck, tableId, time);
|
frame.showDeckEditor(DeckEditorMode.LIMITED_BUILDING, deck, tableId, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void viewLimitedDeck(Deck deck, UUID tableId, int time) {
|
||||||
|
frame.showDeckEditor(DeckEditorMode.VIEW_LIMITED_DECK, deck, tableId, time);
|
||||||
|
}
|
||||||
|
|
||||||
private void handleException(Exception ex) {
|
private void handleException(Exception ex) {
|
||||||
logger.fatal("Client error\n", ex);
|
logger.fatal("Client error\n", ex);
|
||||||
frame.showError("Error: " + ex.getMessage());
|
frame.showError("Error: " + ex.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ public class TablePlayerPanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean joinTable(UUID roomId, UUID tableId) throws IOException, ClassNotFoundException {
|
public boolean joinTable(UUID roomId, UUID tableId) throws IOException, ClassNotFoundException {
|
||||||
if (!this.cbPlayerType.getSelectedItem().equals("Human")) {
|
if (this.cbPlayerType.getSelectedItem() != PlayerType.HUMAN) {
|
||||||
return SessionHandler.joinTable(roomId, tableId, this.newPlayerPanel.getPlayerName(), (PlayerType) this.cbPlayerType.getSelectedItem(), this.newPlayerPanel.getLevel(), DeckImporterUtil.importDeck(this.newPlayerPanel.getDeckFile()), "");
|
return SessionHandler.joinTable(roomId, tableId, this.newPlayerPanel.getPlayerName(), (PlayerType) this.cbPlayerType.getSelectedItem(), this.newPlayerPanel.getLevel(), DeckImporterUtil.importDeck(this.newPlayerPanel.getDeckFile()), "");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -42,13 +42,14 @@ import javax.swing.*;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class TournamentPlayerPanel extends javax.swing.JPanel {
|
public class TournamentPlayerPanel extends javax.swing.JPanel {
|
||||||
|
|
||||||
|
|
||||||
/** Creates new form TournamentPlayerPanel */
|
/**
|
||||||
|
* Creates new form TournamentPlayerPanel
|
||||||
|
*/
|
||||||
public TournamentPlayerPanel() {
|
public TournamentPlayerPanel() {
|
||||||
initComponents();
|
initComponents();
|
||||||
this.pnlPlayerName.setVisible(false);
|
this.pnlPlayerName.setVisible(false);
|
||||||
|
|
@ -64,7 +65,7 @@ public class TournamentPlayerPanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean joinTournamentTable(UUID roomId, UUID tableId, DeckCardLists deckCardLists) {
|
public boolean joinTournamentTable(UUID roomId, UUID tableId, DeckCardLists deckCardLists) {
|
||||||
if (!this.cbPlayerType.getSelectedItem().equals("Human")) {
|
if (this.cbPlayerType.getSelectedItem() != PlayerType.HUMAN) {
|
||||||
return SessionHandler.joinTournamentTable(
|
return SessionHandler.joinTournamentTable(
|
||||||
roomId,
|
roomId,
|
||||||
tableId,
|
tableId,
|
||||||
|
|
@ -73,12 +74,13 @@ public class TournamentPlayerPanel extends javax.swing.JPanel {
|
||||||
(Integer) spnLevel.getValue(),
|
(Integer) spnLevel.getValue(),
|
||||||
deckCardLists,
|
deckCardLists,
|
||||||
"");
|
"");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** This method is called from within the constructor to
|
/**
|
||||||
|
* This method is called from within the constructor to
|
||||||
* initialize the form.
|
* initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is
|
* WARNING: Do NOT modify this code. The content of this method is
|
||||||
* always regenerated by the Form Editor.
|
* always regenerated by the Form Editor.
|
||||||
|
|
@ -99,7 +101,7 @@ public class TournamentPlayerPanel extends javax.swing.JPanel {
|
||||||
jLabel1.setLabelFor(cbPlayerType);
|
jLabel1.setLabelFor(cbPlayerType);
|
||||||
jLabel1.setText("Type:");
|
jLabel1.setText("Type:");
|
||||||
|
|
||||||
cbPlayerType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
cbPlayerType.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"}));
|
||||||
cbPlayerType.addActionListener(evt -> cbPlayerTypeActionPerformed(evt));
|
cbPlayerType.addActionListener(evt -> cbPlayerTypeActionPerformed(evt));
|
||||||
|
|
||||||
lblPlayerNum.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
|
lblPlayerNum.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
|
||||||
|
|
@ -115,56 +117,55 @@ public class TournamentPlayerPanel extends javax.swing.JPanel {
|
||||||
javax.swing.GroupLayout pnlPlayerNameLayout = new javax.swing.GroupLayout(pnlPlayerName);
|
javax.swing.GroupLayout pnlPlayerNameLayout = new javax.swing.GroupLayout(pnlPlayerName);
|
||||||
pnlPlayerName.setLayout(pnlPlayerNameLayout);
|
pnlPlayerName.setLayout(pnlPlayerNameLayout);
|
||||||
pnlPlayerNameLayout.setHorizontalGroup(
|
pnlPlayerNameLayout.setHorizontalGroup(
|
||||||
pnlPlayerNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
pnlPlayerNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(pnlPlayerNameLayout.createSequentialGroup()
|
.addGroup(pnlPlayerNameLayout.createSequentialGroup()
|
||||||
.addComponent(jLabel3)
|
.addComponent(jLabel3)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(spnLevel, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(spnLevel, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(67, 67, 67)
|
.addGap(67, 67, 67)
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(txtPlayerName, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
|
.addComponent(txtPlayerName, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
pnlPlayerNameLayout.setVerticalGroup(
|
pnlPlayerNameLayout.setVerticalGroup(
|
||||||
pnlPlayerNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
pnlPlayerNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(pnlPlayerNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(pnlPlayerNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(txtPlayerName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(txtPlayerName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(jLabel3)
|
.addComponent(jLabel3)
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addComponent(spnLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(spnLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
);
|
);
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
this.setLayout(layout);
|
this.setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(lblPlayerNum)
|
.addComponent(lblPlayerNum)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(cbPlayerType, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(cbPlayerType, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(pnlPlayerName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addComponent(pnlPlayerName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||||
.addComponent(lblPlayerNum)
|
.addComponent(lblPlayerNum)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addComponent(cbPlayerType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(cbPlayerType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addComponent(pnlPlayerName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(pnlPlayerName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
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 (!this.cbPlayerType.getSelectedItem().equals("Human")) {
|
if (this.cbPlayerType.getSelectedItem() != PlayerType.HUMAN) {
|
||||||
this.pnlPlayerName.setVisible(true);
|
this.pnlPlayerName.setVisible(true);
|
||||||
if (this.txtPlayerName.getText().isEmpty()) {
|
if (this.txtPlayerName.getText().isEmpty()) {
|
||||||
this.txtPlayerName.setText("Computer " + this.lblPlayerNum.getText());
|
this.txtPlayerName.setText("Computer " + this.lblPlayerNum.getText());
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.pnlPlayerName.setVisible(false);
|
this.pnlPlayerName.setVisible(false);
|
||||||
}
|
}
|
||||||
this.revalidate();
|
this.revalidate();
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,6 @@ dd3evg=ddaevg
|
||||||
dd3gvl=ddagvl
|
dd3gvl=ddagvl
|
||||||
dd3jvc=ddajvc
|
dd3jvc=ddajvc
|
||||||
# Remove setname as soon as the images can be downloaded
|
# Remove setname as soon as the images can be downloaded
|
||||||
ignore.urls=TOK,PCA,ANB,HOU,C17
|
ignore.urls=TOK,PCA,ANB,HOU,C17,IMA
|
||||||
# sets ordered by release time (newest goes first)
|
# sets ordered by release time (newest goes first)
|
||||||
token.lookup.order=C17,ANB,HOU,MM3,DDS,AKH,DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,MPS,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
|
token.lookup.order=IMA,C17,ANB,HOU,MM3,DDS,AKH,DD3DVD,DD3EVG,DD3GVL,DD3JVC,H09,AER,PCA,C16,V16,MPS,KLD,DDR,CN2,EMN,EMA,SOI,DDQ,CP,CMA,ARENA,SUS,APAC,EURO,UGIN,C15,OGW,EXP,DDP,BFZ,DRB,V09,V10,V11,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
|
||||||
|
|
@ -13,6 +13,7 @@ public enum ClientCallbackMethod {
|
||||||
START_DRAFT("startDraft"),
|
START_DRAFT("startDraft"),
|
||||||
START_TOURNAMENT("startTournament"),
|
START_TOURNAMENT("startTournament"),
|
||||||
SIDEBOARD("sideboard"),
|
SIDEBOARD("sideboard"),
|
||||||
|
VIEW_LIMITED_DECK("viewLimitedDeck"),
|
||||||
CONSTRUCT("construct"),
|
CONSTRUCT("construct"),
|
||||||
SHOW_USERMESSAGE("showUserMessage"),
|
SHOW_USERMESSAGE("showUserMessage"),
|
||||||
WATCHGAME("watchGame"),
|
WATCHGAME("watchGame"),
|
||||||
|
|
@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
||||||
public final static int MAGE_VERSION_MAJOR = 1;
|
public final static int MAGE_VERSION_MAJOR = 1;
|
||||||
public final static int MAGE_VERSION_MINOR = 4;
|
public final static int MAGE_VERSION_MINOR = 4;
|
||||||
public final static int MAGE_VERSION_PATCH = 23;
|
public final static int MAGE_VERSION_PATCH = 23;
|
||||||
public final static String MAGE_VERSION_MINOR_PATCH = "V1";
|
public final static String MAGE_VERSION_MINOR_PATCH = "V3";
|
||||||
public final static String MAGE_VERSION_INFO = "";
|
public final static String MAGE_VERSION_INFO = "";
|
||||||
|
|
||||||
private final int major;
|
private final int major;
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue