* Finished button handling above stack.
|
|
@ -65,6 +65,7 @@ import java.util.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CancellationException;
|
import java.util.concurrent.CancellationException;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
import javax.swing.border.EmptyBorder;
|
||||||
import mage.constants.PlayerAction;
|
import mage.constants.PlayerAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -219,8 +220,8 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
private void saveDividerLocations() {
|
private void saveDividerLocations() {
|
||||||
// save panel sizes and divider locations.
|
// save panel sizes and divider locations.
|
||||||
Rectangle rec = MageFrame.getDesktop().getBounds();
|
Rectangle rec = MageFrame.getDesktop().getBounds();
|
||||||
StringBuilder sb = new StringBuilder(Double.toString(rec.getWidth())).append("x").append(Double.toString(rec.getHeight()));
|
String sb = Double.toString(rec.getWidth()) + "x" + Double.toString(rec.getHeight());
|
||||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, sb.toString());
|
PreferencesDialog.saveValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, sb);
|
||||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_0, Integer.toString(this.jSplitPane0.getDividerLocation()));
|
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_0, Integer.toString(this.jSplitPane0.getDividerLocation()));
|
||||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_1, Integer.toString(this.jSplitPane1.getDividerLocation()));
|
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_1, Integer.toString(this.jSplitPane1.getDividerLocation()));
|
||||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_2, Integer.toString(this.jSplitPane2.getDividerLocation()));
|
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_2, Integer.toString(this.jSplitPane2.getDividerLocation()));
|
||||||
|
|
@ -230,9 +231,9 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
Rectangle rec = MageFrame.getDesktop().getBounds();
|
Rectangle rec = MageFrame.getDesktop().getBounds();
|
||||||
if (rec != null) {
|
if (rec != null) {
|
||||||
String size = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, null);
|
String size = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, null);
|
||||||
StringBuilder sb = new StringBuilder(Double.toString(rec.getWidth())).append("x").append(Double.toString(rec.getHeight()));
|
String sb = Double.toString(rec.getWidth()) + "x" + Double.toString(rec.getHeight());
|
||||||
// use divider positions only if screen size is the same as it was the time the settings were saved
|
// use divider positions only if screen size is the same as it was the time the settings were saved
|
||||||
if (size != null && size.equals(sb.toString())) {
|
if (size != null && size.equals(sb)) {
|
||||||
|
|
||||||
String location = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_0, null);
|
String location = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAMEPANEL_DIVIDER_LOCATION_0, null);
|
||||||
if (location != null && jSplitPane0 != null) {
|
if (location != null && jSplitPane0 != null) {
|
||||||
|
|
@ -260,8 +261,8 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
bigCard.setMaximumSize(bbDimension);
|
bigCard.setMaximumSize(bbDimension);
|
||||||
bigCard.setMinimumSize(bbDimension);
|
bigCard.setMinimumSize(bbDimension);
|
||||||
bigCard.setPreferredSize(bbDimension);
|
bigCard.setPreferredSize(bbDimension);
|
||||||
pnlGameInfo.revalidate();
|
pnlShortCuts.revalidate();
|
||||||
pnlGameInfo.repaint();
|
pnlShortCuts.repaint();
|
||||||
//this.handContainer.sizeHand(0.8, smallMode);
|
//this.handContainer.sizeHand(0.8, smallMode);
|
||||||
for (PlayAreaPanel p: players.values()) {
|
for (PlayAreaPanel p: players.values()) {
|
||||||
p.sizePlayer(smallMode);
|
p.sizePlayer(smallMode);
|
||||||
|
|
@ -275,8 +276,8 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
bigCard.setMaximumSize(bbDimension);
|
bigCard.setMaximumSize(bbDimension);
|
||||||
bigCard.setMinimumSize(bbDimension);
|
bigCard.setMinimumSize(bbDimension);
|
||||||
bigCard.setPreferredSize(bbDimension);
|
bigCard.setPreferredSize(bbDimension);
|
||||||
pnlGameInfo.revalidate();
|
pnlShortCuts.revalidate();
|
||||||
pnlGameInfo.repaint();
|
pnlShortCuts.repaint();
|
||||||
this.handContainer.sizeHand(1, smallMode);
|
this.handContainer.sizeHand(1, smallMode);
|
||||||
for (PlayAreaPanel p: players.values()) {
|
for (PlayAreaPanel p: players.values()) {
|
||||||
p.sizePlayer(smallMode);
|
p.sizePlayer(smallMode);
|
||||||
|
|
@ -300,11 +301,19 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
this.feedbackPanel.init(gameId);
|
this.feedbackPanel.init(gameId);
|
||||||
this.feedbackPanel.clear();
|
this.feedbackPanel.clear();
|
||||||
this.abilityPicker.init(session, gameId);
|
this.abilityPicker.init(session, gameId);
|
||||||
|
|
||||||
this.btnConcede.setVisible(true);
|
this.btnConcede.setVisible(true);
|
||||||
this.btnEndTurn.setVisible(true);
|
|
||||||
this.btnSwitchHands.setVisible(false);
|
|
||||||
this.pnlReplay.setVisible(false);
|
|
||||||
this.btnStopWatching.setVisible(false);
|
this.btnStopWatching.setVisible(false);
|
||||||
|
this.btnSwitchHands.setVisible(false);
|
||||||
|
this.btnCancelSkip.setVisible(true);
|
||||||
|
|
||||||
|
this.btnSkipToNextTurn.setVisible(true);
|
||||||
|
this.btnSkipToEndTurn.setVisible(true);
|
||||||
|
this.btnSkipToNextMain.setVisible(true);
|
||||||
|
this.btnSkipToYourTurn.setVisible(true);
|
||||||
|
|
||||||
|
this.pnlReplay.setVisible(false);
|
||||||
|
|
||||||
this.gameChatPanel.clear();
|
this.gameChatPanel.clear();
|
||||||
this.gameChatPanel.connect(session.getGameChatId(gameId));
|
this.gameChatPanel.connect(session.getGameChatId(gameId));
|
||||||
if (!session.joinGame(gameId)) {
|
if (!session.joinGame(gameId)) {
|
||||||
|
|
@ -320,10 +329,18 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
MageFrame.addGame(gameId, this);
|
MageFrame.addGame(gameId, this);
|
||||||
this.feedbackPanel.init(gameId);
|
this.feedbackPanel.init(gameId);
|
||||||
this.feedbackPanel.clear();
|
this.feedbackPanel.clear();
|
||||||
|
|
||||||
this.btnConcede.setVisible(false);
|
this.btnConcede.setVisible(false);
|
||||||
this.btnEndTurn.setVisible(false);
|
|
||||||
this.btnSwitchHands.setVisible(false);
|
|
||||||
this.btnStopWatching.setVisible(true);
|
this.btnStopWatching.setVisible(true);
|
||||||
|
this.btnSwitchHands.setVisible(false);
|
||||||
|
this.btnCancelSkip.setVisible(false);
|
||||||
|
|
||||||
|
this.btnSkipToNextTurn.setVisible(false);
|
||||||
|
this.btnSkipToEndTurn.setVisible(false);
|
||||||
|
this.btnSkipToNextMain.setVisible(false);
|
||||||
|
this.btnSkipToYourTurn.setVisible(false);
|
||||||
|
|
||||||
|
|
||||||
this.pnlReplay.setVisible(false);
|
this.pnlReplay.setVisible(false);
|
||||||
this.gameChatPanel.clear();
|
this.gameChatPanel.clear();
|
||||||
this.gameChatPanel.connect(session.getGameChatId(gameId));
|
this.gameChatPanel.connect(session.getGameChatId(gameId));
|
||||||
|
|
@ -343,7 +360,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
this.feedbackPanel.init(gameId);
|
this.feedbackPanel.init(gameId);
|
||||||
this.feedbackPanel.clear();
|
this.feedbackPanel.clear();
|
||||||
this.btnConcede.setVisible(false);
|
this.btnConcede.setVisible(false);
|
||||||
this.btnEndTurn.setVisible(false);
|
this.btnSkipToNextTurn.setVisible(false);
|
||||||
this.btnSwitchHands.setVisible(false);
|
this.btnSwitchHands.setVisible(false);
|
||||||
this.btnStopWatching.setVisible(false);
|
this.btnStopWatching.setVisible(false);
|
||||||
this.pnlReplay.setVisible(true);
|
this.pnlReplay.setVisible(true);
|
||||||
|
|
@ -489,7 +506,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (previous != visible) {
|
if (previous != visible) {
|
||||||
btnSwitchHands.setVisible(visible);
|
btnSwitchHands.setVisible(visible);
|
||||||
if (visible) {
|
if (visible) {
|
||||||
JOptionPane.showMessageDialog(null, "You control other player's turn. \nUse \"Switch Hand\" on the bottom to switch between cards in different hands.");
|
JOptionPane.showMessageDialog(null, "You control other player's turn. \nUse \"Switch Hand\" button to switch between cards in different hands.");
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(null, "You lost control on other player's turn.");
|
JOptionPane.showMessageDialog(null, "You lost control on other player's turn.");
|
||||||
}
|
}
|
||||||
|
|
@ -809,7 +826,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
jSplitPane0 = new javax.swing.JSplitPane();
|
jSplitPane0 = new javax.swing.JSplitPane();
|
||||||
jPanel2 = new javax.swing.JPanel();
|
jPanel2 = new javax.swing.JPanel();
|
||||||
jPanel3 = new javax.swing.JPanel();
|
jPanel3 = new javax.swing.JPanel();
|
||||||
pnlGameInfo = new javax.swing.JPanel();
|
pnlShortCuts = new javax.swing.JPanel();
|
||||||
lblPhase = new javax.swing.JLabel();
|
lblPhase = new javax.swing.JLabel();
|
||||||
txtPhase = new javax.swing.JLabel();
|
txtPhase = new javax.swing.JLabel();
|
||||||
lblStep = new javax.swing.JLabel();
|
lblStep = new javax.swing.JLabel();
|
||||||
|
|
@ -822,11 +839,13 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
lblPriority = new javax.swing.JLabel();
|
lblPriority = new javax.swing.JLabel();
|
||||||
feedbackPanel = new mage.client.game.FeedbackPanel();
|
feedbackPanel = new mage.client.game.FeedbackPanel();
|
||||||
|
|
||||||
btnConcede = new javax.swing.JButton();
|
btnCancelSkip = new javax.swing.JButton(); // F3
|
||||||
btnEndTurn = new javax.swing.JButton();
|
btnSkipToNextTurn = new javax.swing.JButton(); // F4
|
||||||
btnCancelSkip = new javax.swing.JButton();
|
btnSkipToEndTurn = new javax.swing.JButton(); // F5
|
||||||
btnSkipToYourTurn = new javax.swing.JButton();
|
btnSkipToNextMain = new javax.swing.JButton(); // F7
|
||||||
|
btnSkipToYourTurn = new javax.swing.JButton(); // F9
|
||||||
|
|
||||||
|
btnConcede = new javax.swing.JButton();
|
||||||
btnSwitchHands = new javax.swing.JButton();
|
btnSwitchHands = new javax.swing.JButton();
|
||||||
|
|
||||||
btnStopWatching = new javax.swing.JButton();
|
btnStopWatching = new javax.swing.JButton();
|
||||||
|
|
@ -867,8 +886,8 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
|
|
||||||
restoreDividerLocations();
|
restoreDividerLocations();
|
||||||
|
|
||||||
pnlGameInfo.setOpaque(false);
|
pnlShortCuts.setOpaque(false);
|
||||||
pnlGameInfo.setPreferredSize(new Dimension(400, 60));
|
pnlShortCuts.setPreferredSize(new Dimension(400, 60));
|
||||||
lblPhase.setLabelFor(txtPhase);
|
lblPhase.setLabelFor(txtPhase);
|
||||||
lblPhase.setText("Phase:");
|
lblPhase.setText("Phase:");
|
||||||
|
|
||||||
|
|
@ -921,57 +940,34 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
btnCancelSkip.setText("F3");
|
btnCancelSkip.setContentAreaFilled(false);
|
||||||
btnCancelSkip.setToolTipText("Cancel all skip actions (F3)");
|
btnCancelSkip.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
btnCancelSkip.setFocusable(true);
|
btnCancelSkip.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getCancelSkipButtonImage()));
|
||||||
|
btnCancelSkip.setToolTipText("Cancel all skip actions (F3).");
|
||||||
|
btnCancelSkip.setFocusable(false);
|
||||||
btnCancelSkip.addMouseListener(new MouseAdapter() {
|
btnCancelSkip.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent evt) {
|
public void mouseClicked(MouseEvent evt) {
|
||||||
restorePriorityActionPerformed(null);
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
restorePriorityActionPerformed(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
KeyStroke ks9 = KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0);
|
btnSkipToNextTurn.setContentAreaFilled(false);
|
||||||
this.getInputMap(c).put(ks9, "F9_PRESS");
|
btnSkipToNextTurn.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
this.getActionMap().put("F9_PRESS", new AbstractAction() {
|
btnSkipToNextTurn.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getSkipNextTurnButtonImage()));
|
||||||
@Override
|
btnSkipToNextTurn.setToolTipText("Skip to next turn (F4).");
|
||||||
public void actionPerformed(ActionEvent actionEvent) {
|
btnSkipToNextTurn.setFocusable(false);
|
||||||
btnPassPriorityUntilNextYourTurnActionPerformed(actionEvent);
|
btnSkipToNextTurn.addMouseListener(new MouseAdapter() {
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnSkipToYourTurn.setText("F9");
|
|
||||||
btnSkipToYourTurn.setToolTipText("Skip to your next turn (F9)");
|
|
||||||
btnSkipToYourTurn.setFocusable(true);
|
|
||||||
btnSkipToYourTurn.addMouseListener(new MouseAdapter() {
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent evt) {
|
public void mouseClicked(MouseEvent evt) {
|
||||||
btnPassPriorityUntilNextYourTurnActionPerformed(null);
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
btnEndTurnActionPerformed(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
btnConcede.setText("Concede");
|
|
||||||
btnConcede.setToolTipText("Concede the current game");
|
|
||||||
btnConcede.setFocusable(false);
|
|
||||||
btnConcede.addMouseListener(new MouseAdapter() {
|
|
||||||
@Override
|
|
||||||
public void mouseClicked(MouseEvent evt) {
|
|
||||||
btnConcedeActionPerformed(null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnEndTurn.setText("F4");
|
|
||||||
btnEndTurn.setToolTipText("End This Turn (F4)");
|
|
||||||
btnEndTurn.setFocusable(false);
|
|
||||||
btnEndTurn.addMouseListener(new MouseAdapter() {
|
|
||||||
@Override
|
|
||||||
public void mouseClicked(MouseEvent evt) {
|
|
||||||
btnEndTurnActionPerformed(null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0);
|
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0);
|
||||||
this.getInputMap(c).put(ks, "F4_PRESS");
|
this.getInputMap(c).put(ks, "F4_PRESS");
|
||||||
this.getActionMap().put("F4_PRESS", new AbstractAction() {
|
this.getActionMap().put("F4_PRESS", new AbstractAction() {
|
||||||
|
|
@ -981,6 +977,20 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
btnSkipToEndTurn.setContentAreaFilled(false);
|
||||||
|
btnSkipToEndTurn.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
|
btnSkipToEndTurn.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getSkipEndTurnButtonImage()));
|
||||||
|
btnSkipToEndTurn.setToolTipText("Skip to (opponents/next) end of turn step (F5) - adjust using preferences.");
|
||||||
|
btnSkipToEndTurn.setFocusable(false);
|
||||||
|
btnSkipToEndTurn.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent evt) {
|
||||||
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
btnUntilEndOfTurnActionPerformed(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ks = KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0);
|
ks = KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0);
|
||||||
this.getInputMap(c).put(ks, "F5_PRESS");
|
this.getInputMap(c).put(ks, "F5_PRESS");
|
||||||
this.getActionMap().put("F5_PRESS", new AbstractAction() {
|
this.getActionMap().put("F5_PRESS", new AbstractAction() {
|
||||||
|
|
@ -990,6 +1000,20 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
btnSkipToNextMain.setContentAreaFilled(false);
|
||||||
|
btnSkipToNextMain.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
|
btnSkipToNextMain.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getSkipMainButtonImage()));
|
||||||
|
btnSkipToNextMain.setToolTipText("Skip to (your) next main phase (F7) - adjust using preferences.");
|
||||||
|
btnSkipToNextMain.setFocusable(false);
|
||||||
|
btnSkipToNextMain.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent evt) {
|
||||||
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
btnUntilNextMainPhaseActionPerformed(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ks = KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0);
|
ks = KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0);
|
||||||
this.getInputMap(c).put(ks, "F7_PRESS");
|
this.getInputMap(c).put(ks, "F7_PRESS");
|
||||||
this.getActionMap().put("F7_PRESS", new AbstractAction() {
|
this.getActionMap().put("F7_PRESS", new AbstractAction() {
|
||||||
|
|
@ -999,6 +1023,42 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
btnSkipToYourTurn.setContentAreaFilled(false);
|
||||||
|
btnSkipToYourTurn.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
|
btnSkipToYourTurn.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getSkipYourNextTurnButtonImage()));
|
||||||
|
btnSkipToYourTurn.setToolTipText("Skip to your next turn (F9).");
|
||||||
|
btnSkipToYourTurn.setFocusable(false);
|
||||||
|
btnSkipToYourTurn.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent evt) {
|
||||||
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
btnPassPriorityUntilNextYourTurnActionPerformed(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
KeyStroke ks9 = KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0);
|
||||||
|
this.getInputMap(c).put(ks9, "F9_PRESS");
|
||||||
|
this.getActionMap().put("F9_PRESS", new AbstractAction() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
|
btnPassPriorityUntilNextYourTurnActionPerformed(actionEvent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnConcede.setContentAreaFilled(false);
|
||||||
|
btnConcede.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
|
btnConcede.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getConcedeButtonImage()));
|
||||||
|
btnConcede.setToolTipText("Concede the current game.");
|
||||||
|
btnConcede.setFocusable(false);
|
||||||
|
btnConcede.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent evt) {
|
||||||
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
btnConcedeActionPerformed(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
KeyStroke ks2 = KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0);
|
KeyStroke ks2 = KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0);
|
||||||
|
|
@ -1077,20 +1137,31 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
btnSwitchHands.setContentAreaFilled(false);
|
||||||
btnSwitchHands.setText("Switch Hands");
|
btnSwitchHands.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
|
btnSwitchHands.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getSwitchHandsButtonImage()));
|
||||||
|
btnSwitchHands.setFocusable(false);
|
||||||
|
btnSwitchHands.setToolTipText("Switch between your hand cards and hand cards of controlled players.");
|
||||||
btnSwitchHands.addMouseListener(new MouseAdapter() {
|
btnSwitchHands.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent evt) {
|
public void mouseClicked(MouseEvent evt) {
|
||||||
btnSwitchHandActionPerformed(null);
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
btnSwitchHandActionPerformed(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
btnStopWatching.setText("Stop Watching");
|
btnStopWatching.setContentAreaFilled(false);
|
||||||
btnStopWatching.addActionListener(new java.awt.event.ActionListener() {
|
btnStopWatching.setBorder(new EmptyBorder(0,0,0,0));
|
||||||
|
btnStopWatching.setIcon(new ImageIcon(ImageManagerImpl.getInstance().getStopWatchButtonImage()));
|
||||||
|
btnStopWatching.setFocusable(false);
|
||||||
|
btnSwitchHands.setToolTipText("Stop watching this game.");
|
||||||
|
btnStopWatching.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void mouseClicked(MouseEvent evt) {
|
||||||
btnStopWatchingActionPerformed(evt);
|
if (evt.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
btnStopWatchingActionPerformed(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1163,35 +1234,32 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Game info panel (buttons on the right panel)
|
// Game info panel (buttons on the right panel)
|
||||||
javax.swing.GroupLayout gl_pnlGameInfo = new javax.swing.GroupLayout(pnlGameInfo);
|
javax.swing.GroupLayout gl_pnlShortCuts = new javax.swing.GroupLayout(pnlShortCuts);
|
||||||
pnlGameInfo.setLayout(gl_pnlGameInfo);
|
pnlShortCuts.setLayout(gl_pnlShortCuts);
|
||||||
gl_pnlGameInfo.setHorizontalGroup(
|
gl_pnlShortCuts.setHorizontalGroup(gl_pnlShortCuts.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
gl_pnlGameInfo.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(gl_pnlShortCuts.createSequentialGroup()
|
||||||
.addGroup(gl_pnlGameInfo.createSequentialGroup()
|
.addComponent(btnSkipToNextTurn)
|
||||||
.addGap(10, 10, 10)
|
.addComponent(btnSkipToEndTurn)
|
||||||
.addComponent(btnConcede)
|
.addComponent(btnSkipToNextMain)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(btnCancelSkip)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(btnEndTurn)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(btnSkipToYourTurn)
|
.addComponent(btnSkipToYourTurn)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
)
|
||||||
|
.addGroup(gl_pnlShortCuts.createSequentialGroup()
|
||||||
.addComponent(btnSwitchHands)
|
.addComponent(btnSwitchHands)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addComponent(btnCancelSkip)
|
||||||
|
.addComponent(btnConcede)
|
||||||
.addComponent(btnStopWatching)
|
.addComponent(btnStopWatching)
|
||||||
.addContainerGap(62, Short.MAX_VALUE))
|
)
|
||||||
//.addComponent(bigCard, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
|
//.addComponent(bigCard, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
|
||||||
//.addComponent(feedbackPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
|
//.addComponent(feedbackPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
|
||||||
//.addComponent(stack, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
|
//.addComponent(stack, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
|
||||||
.addGroup(gl_pnlGameInfo.createSequentialGroup()
|
|
||||||
|
.addGroup(gl_pnlShortCuts.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(pnlReplay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(pnlReplay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap(51, Short.MAX_VALUE))
|
.addContainerGap(51, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
gl_pnlGameInfo.setVerticalGroup(
|
gl_pnlShortCuts.setVerticalGroup(gl_pnlShortCuts.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
gl_pnlGameInfo.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(gl_pnlShortCuts.createSequentialGroup()
|
||||||
.addGroup(gl_pnlGameInfo.createSequentialGroup()
|
|
||||||
//.addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
//.addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
//.addGap(1, 1, 1)
|
//.addGap(1, 1, 1)
|
||||||
//.addComponent(feedbackPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
|
//.addComponent(feedbackPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
|
@ -1199,13 +1267,20 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 164, Short.MAX_VALUE)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 164, Short.MAX_VALUE)
|
||||||
.addComponent(pnlReplay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(pnlReplay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(gl_pnlGameInfo.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
||||||
.addComponent(btnConcede)
|
.addGroup(gl_pnlShortCuts.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(btnCancelSkip)
|
.addComponent(btnSkipToNextTurn)
|
||||||
.addComponent(btnEndTurn)
|
.addComponent(btnSkipToEndTurn)
|
||||||
|
.addComponent(btnSkipToNextMain)
|
||||||
.addComponent(btnSkipToYourTurn)
|
.addComponent(btnSkipToYourTurn)
|
||||||
|
)
|
||||||
|
.addGroup(gl_pnlShortCuts.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(btnSwitchHands)
|
.addComponent(btnSwitchHands)
|
||||||
.addComponent(btnStopWatching)))
|
.addComponent(btnCancelSkip)
|
||||||
|
.addComponent(btnConcede)
|
||||||
|
.addComponent(btnStopWatching)
|
||||||
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
pnlBattlefield.setLayout(new java.awt.GridBagLayout());
|
pnlBattlefield.setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
@ -1273,7 +1348,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
.addComponent(handContainer, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(handContainer, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
)
|
)
|
||||||
.addGroup(gl_jPanel3.createParallelGroup(Alignment.LEADING)
|
.addGroup(gl_jPanel3.createParallelGroup(Alignment.LEADING)
|
||||||
.addComponent(pnlGameInfo, 400, 400, 400)
|
.addComponent(pnlShortCuts, 400, 400, 400)
|
||||||
.addComponent(stack, 400, 400, 400)
|
.addComponent(stack, 400, 400, 400)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -1294,7 +1369,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
//.addPreferredGap(ComponentPlacement.RELATED)
|
//.addPreferredGap(ComponentPlacement.RELATED)
|
||||||
.addGroup(gl_jPanel3.createParallelGroup(Alignment.LEADING)
|
.addGroup(gl_jPanel3.createParallelGroup(Alignment.LEADING)
|
||||||
.addGroup(gl_jPanel3.createSequentialGroup()
|
.addGroup(gl_jPanel3.createSequentialGroup()
|
||||||
.addComponent(pnlGameInfo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
.addComponent(pnlShortCuts, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(0)
|
.addGap(0)
|
||||||
.addComponent(stack, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
.addComponent(stack, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
||||||
)
|
)
|
||||||
|
|
@ -1322,16 +1397,6 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
gbl.setConstraints( bigCard, gbc );
|
gbl.setConstraints( bigCard, gbc );
|
||||||
jPanel2.add( bigCard );
|
jPanel2.add( bigCard );
|
||||||
|
|
||||||
// GridBagConstraints gbc2 = new GridBagConstraints();
|
|
||||||
// gbc2.fill = GridBagConstraints.NONE;
|
|
||||||
// gbc2.gridx = 0; gbc2.gridy = GridBagConstraints.RELATIVE;
|
|
||||||
// gbc2.gridwidth = 1; gbc2.gridheight = 1; //size 1/5
|
|
||||||
// gbc2.weightx = 0.0; gbc2.weighty = 0.0;
|
|
||||||
// gl_jPanel3.setConstraints( pnlGameInfo, gbc2 );
|
|
||||||
|
|
||||||
// gbl.setConstraints( pnlGameInfo, gbc2 );
|
|
||||||
// jPanel2.add( pnlGameInfo );
|
|
||||||
|
|
||||||
jPanel2.setOpaque(false);
|
jPanel2.setOpaque(false);
|
||||||
|
|
||||||
// game pane and chat/log pane
|
// game pane and chat/log pane
|
||||||
|
|
@ -1364,12 +1429,21 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
for (MouseListener ml :this.btnSkipToYourTurn.getMouseListeners()) {
|
for (MouseListener ml :this.btnSkipToYourTurn.getMouseListeners()) {
|
||||||
this.btnSkipToYourTurn.removeMouseListener(ml);
|
this.btnSkipToYourTurn.removeMouseListener(ml);
|
||||||
}
|
}
|
||||||
for (MouseListener ml :this.btnEndTurn.getMouseListeners()) {
|
for (MouseListener ml :this.btnSkipToEndTurn.getMouseListeners()) {
|
||||||
this.btnEndTurn.removeMouseListener(ml);
|
this.btnSkipToEndTurn.removeMouseListener(ml);
|
||||||
|
}
|
||||||
|
for (MouseListener ml :this.btnSkipToNextMain.getMouseListeners()) {
|
||||||
|
this.btnSkipToNextMain.removeMouseListener(ml);
|
||||||
|
}
|
||||||
|
for (MouseListener ml :this.btnSkipToNextTurn.getMouseListeners()) {
|
||||||
|
this.btnSkipToNextTurn.removeMouseListener(ml);
|
||||||
}
|
}
|
||||||
for (MouseListener ml :this.btnSwitchHands.getMouseListeners()) {
|
for (MouseListener ml :this.btnSwitchHands.getMouseListeners()) {
|
||||||
this.btnSwitchHands.removeMouseListener(ml);
|
this.btnSwitchHands.removeMouseListener(ml);
|
||||||
}
|
}
|
||||||
|
for (MouseListener ml :this.btnStopWatching.getMouseListeners()) {
|
||||||
|
this.btnStopWatching.removeMouseListener(ml);
|
||||||
|
}
|
||||||
for (MouseListener ml :this.jPhases.getMouseListeners()) {
|
for (MouseListener ml :this.jPhases.getMouseListeners()) {
|
||||||
this.jPhases.removeMouseListener(ml);
|
this.jPhases.removeMouseListener(ml);
|
||||||
}
|
}
|
||||||
|
|
@ -1382,9 +1456,6 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
for (ActionListener al :this.btnPlay.getActionListeners()) {
|
for (ActionListener al :this.btnPlay.getActionListeners()) {
|
||||||
this.btnPlay.removeActionListener(al);
|
this.btnPlay.removeActionListener(al);
|
||||||
}
|
}
|
||||||
for (ActionListener al :this.btnStopWatching.getActionListeners()) {
|
|
||||||
this.btnStopWatching.removeActionListener(al);
|
|
||||||
}
|
|
||||||
for (ActionListener al :this.btnStopReplay.getActionListeners()) {
|
for (ActionListener al :this.btnStopReplay.getActionListeners()) {
|
||||||
this.btnStopReplay.removeActionListener(al);
|
this.btnStopReplay.removeActionListener(al);
|
||||||
}
|
}
|
||||||
|
|
@ -1558,11 +1629,14 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
private mage.client.components.ability.AbilityPicker abilityPicker;
|
private mage.client.components.ability.AbilityPicker abilityPicker;
|
||||||
private mage.client.cards.BigCard bigCard;
|
private mage.client.cards.BigCard bigCard;
|
||||||
|
|
||||||
|
// private JPanel cancelSkipPanel;
|
||||||
private javax.swing.JButton btnCancelSkip;
|
private javax.swing.JButton btnCancelSkip;
|
||||||
private javax.swing.JButton btnConcede;
|
private javax.swing.JButton btnSkipToNextTurn; // F4
|
||||||
private javax.swing.JButton btnEndTurn;
|
private javax.swing.JButton btnSkipToEndTurn; // F5
|
||||||
private javax.swing.JButton btnSkipToYourTurn;
|
private javax.swing.JButton btnSkipToNextMain; // F7
|
||||||
|
private javax.swing.JButton btnSkipToYourTurn; // F9
|
||||||
|
|
||||||
|
private javax.swing.JButton btnConcede;
|
||||||
private javax.swing.JButton btnSwitchHands;
|
private javax.swing.JButton btnSwitchHands;
|
||||||
|
|
||||||
private javax.swing.JButton btnNextPlay;
|
private javax.swing.JButton btnNextPlay;
|
||||||
|
|
@ -1586,7 +1660,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
private javax.swing.JLabel lblStep;
|
private javax.swing.JLabel lblStep;
|
||||||
private javax.swing.JLabel lblTurn;
|
private javax.swing.JLabel lblTurn;
|
||||||
private javax.swing.JPanel pnlBattlefield;
|
private javax.swing.JPanel pnlBattlefield;
|
||||||
private javax.swing.JPanel pnlGameInfo;
|
private javax.swing.JPanel pnlShortCuts;
|
||||||
private javax.swing.JPanel pnlReplay;
|
private javax.swing.JPanel pnlReplay;
|
||||||
private javax.swing.JLabel txtActivePlayer;
|
private javax.swing.JLabel txtActivePlayer;
|
||||||
private javax.swing.JLabel txtPhase;
|
private javax.swing.JLabel txtPhase;
|
||||||
|
|
|
||||||
|
|
@ -342,6 +342,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
typeButton.setLocation(2, 2);
|
typeButton.setLocation(2, 2);
|
||||||
typeButton.setSize(25, 25);
|
typeButton.setSize(25, 25);
|
||||||
|
|
||||||
|
|
||||||
iconPanel.setVisible(true);
|
iconPanel.setVisible(true);
|
||||||
typeButton.setIcon(new ImageIcon(bufferedImage));
|
typeButton.setIcon(new ImageIcon(bufferedImage));
|
||||||
if (toolTipText != null) {
|
if (toolTipText != null) {
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,15 @@ public interface ImageManager {
|
||||||
Image getDlgNextButtonImage();
|
Image getDlgNextButtonImage();
|
||||||
Image getDlgActiveNextButtonImage();
|
Image getDlgActiveNextButtonImage();
|
||||||
|
|
||||||
|
Image getSwitchHandsButtonImage();
|
||||||
|
Image getStopWatchButtonImage();
|
||||||
|
Image getConcedeButtonImage();
|
||||||
|
Image getCancelSkipButtonImage();
|
||||||
|
Image getSkipNextTurnButtonImage();
|
||||||
|
Image getSkipEndTurnButtonImage();
|
||||||
|
Image getSkipMainButtonImage();
|
||||||
|
Image getSkipYourNextTurnButtonImage();
|
||||||
|
|
||||||
|
|
||||||
Image getPhaseImage(String phase);
|
Image getPhaseImage(String phase);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,9 +237,73 @@ public class ImageManagerImpl implements ImageManager {
|
||||||
return imageDlgActiveNextButton;
|
return imageDlgActiveNextButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getConcedeButtonImage() {
|
||||||
|
if (imageConcedeButton == null) {
|
||||||
|
imageConcedeButton = getBufferedImageFromResource("/buttons/concede.png");
|
||||||
|
}
|
||||||
|
return imageConcedeButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getSwitchHandsButtonImage() {
|
||||||
|
if (imageSwitchHandsButton == null) {
|
||||||
|
imageSwitchHandsButton = getBufferedImageFromResource("/buttons/switch_hands.png");
|
||||||
|
}
|
||||||
|
return imageSwitchHandsButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getStopWatchButtonImage() {
|
||||||
|
if (imageStopWatchingButton == null) {
|
||||||
|
imageStopWatchingButton = getBufferedImageFromResource("/buttons/stop_watching.png");
|
||||||
|
}
|
||||||
|
return imageStopWatchingButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getCancelSkipButtonImage() {
|
||||||
|
if (imageCancelSkipButton == null) {
|
||||||
|
imageCancelSkipButton = getBufferedImageFromResource("/buttons/cancel_skip.png");
|
||||||
|
}
|
||||||
|
return imageCancelSkipButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getSkipNextTurnButtonImage() {
|
||||||
|
if (imageSkipNextTurnButton == null) {
|
||||||
|
imageSkipNextTurnButton = getBufferedImageFromResource("/buttons/skip_turn.png");
|
||||||
|
}
|
||||||
|
return imageSkipNextTurnButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getSkipEndTurnButtonImage() {
|
||||||
|
if (imageSkipToEndTurnButton == null) {
|
||||||
|
imageSkipToEndTurnButton = getBufferedImageFromResource("/buttons/skip_to_end.png");
|
||||||
|
}
|
||||||
|
return imageSkipToEndTurnButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getSkipMainButtonImage() {
|
||||||
|
if (imageSkipToMainButton == null) {
|
||||||
|
imageSkipToMainButton = getBufferedImageFromResource("/buttons/skip_to_main.png");
|
||||||
|
}
|
||||||
|
return imageSkipToMainButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Image getSkipYourNextTurnButtonImage() {
|
||||||
|
if (imageSkipYourNextTurnButton == null) {
|
||||||
|
imageSkipYourNextTurnButton = getBufferedImageFromResource("/buttons/skip_all.png");
|
||||||
|
}
|
||||||
|
return imageSkipYourNextTurnButton;
|
||||||
|
}
|
||||||
|
|
||||||
protected static Image getImageFromResourceTransparent(String path, Color mask, Rectangle rec) {
|
protected static Image getImageFromResourceTransparent(String path, Color mask, Rectangle rec) {
|
||||||
BufferedImage image = null;
|
BufferedImage image;
|
||||||
Image imageCardTransparent = null;
|
Image imageCardTransparent;
|
||||||
Image resized = null;
|
Image resized = null;
|
||||||
|
|
||||||
URL imageURL = ImageManager.class.getResource(path);
|
URL imageURL = ImageManager.class.getResource(path);
|
||||||
|
|
@ -317,5 +381,14 @@ public class ImageManagerImpl implements ImageManager {
|
||||||
private static BufferedImage imageDlgNextButton;
|
private static BufferedImage imageDlgNextButton;
|
||||||
private static BufferedImage imageDlgActiveNextButton;
|
private static BufferedImage imageDlgActiveNextButton;
|
||||||
|
|
||||||
|
private static BufferedImage imageCancelSkipButton;
|
||||||
|
private static BufferedImage imageSwitchHandsButton;
|
||||||
|
private static BufferedImage imageStopWatchingButton;
|
||||||
|
private static BufferedImage imageConcedeButton;
|
||||||
|
private static BufferedImage imageSkipNextTurnButton;
|
||||||
|
private static BufferedImage imageSkipToEndTurnButton;
|
||||||
|
private static BufferedImage imageSkipToMainButton;
|
||||||
|
private static BufferedImage imageSkipYourNextTurnButton;
|
||||||
|
|
||||||
private static Map<String, Image> phasesImages;
|
private static Map<String, Image> phasesImages;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
Mage.Client/src/main/resources/buttons/cancel_skip.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
Mage.Client/src/main/resources/buttons/concede.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Mage.Client/src/main/resources/buttons/skip_all.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Mage.Client/src/main/resources/buttons/skip_to_end.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Mage.Client/src/main/resources/buttons/skip_to_main.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
Mage.Client/src/main/resources/buttons/skip_turn.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Mage.Client/src/main/resources/buttons/stop_watching.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
Mage.Client/src/main/resources/buttons/switch_hands.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |