mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Join Table - Changed handling of messages while creating or joining a table.
This commit is contained in:
parent
50056df24e
commit
fe82b49930
4 changed files with 39 additions and 8 deletions
|
|
@ -356,7 +356,7 @@ public class NewTableDialog extends MageDialog {
|
|||
} catch (ClassNotFoundException ex) {
|
||||
handleError(ex);
|
||||
}
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Error joining table.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
// JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Error joining table.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
session.removeTable(roomId, table.getTableId());
|
||||
table = null;
|
||||
}//GEN-LAST:event_btnOKActionPerformed
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
package mage.client.remote;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
|
@ -252,6 +254,12 @@ public class CallbackClientImpl implements CallbackClient {
|
|||
else if (callback.getMethod().equals("endGameInfo")) {
|
||||
MageFrame.getInstance().showGameEndDialog((GameEndView) callback.getData());
|
||||
}
|
||||
else if (callback.getMethod().equals("showUserMessage")) {
|
||||
List<String> messageData = (List<String>) callback.getData();
|
||||
if (messageData.size() == 2) {
|
||||
JOptionPane.showMessageDialog(null, messageData.get(1), messageData.get(0), JOptionPane.WARNING_MESSAGE);
|
||||
}
|
||||
}
|
||||
else if (callback.getMethod().equals("gameInform")) {
|
||||
|
||||
if (callback.getMessageId() > messageId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue