mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
fixed Issue 64
This commit is contained in:
parent
9d05d5b06a
commit
2f515e242b
3 changed files with 4 additions and 1 deletions
|
|
@ -84,11 +84,13 @@ public class GamePane extends MagePane {
|
|||
}
|
||||
|
||||
public void watchGame(UUID gameId) {
|
||||
this.setTitle("Watching " + gameId);
|
||||
gamePanel.watchGame(gameId);
|
||||
this.toFront();
|
||||
}
|
||||
|
||||
public void replayGame(UUID gameId) {
|
||||
this.setTitle("Replaying " + gameId);
|
||||
gamePanel.replayGame(gameId);
|
||||
this.toFront();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -729,6 +729,7 @@ public class GamePanel extends javax.swing.JPanel {
|
|||
private void btnStopWatchingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStopWatchingActionPerformed
|
||||
if (modalQuestion("Are you sure you want to stop watching?", "Stop watching") == JOptionPane.YES_OPTION) {
|
||||
session.stopWatching(gameId);
|
||||
this.hideGame();
|
||||
}
|
||||
}//GEN-LAST:event_btnStopWatchingActionPerformed
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class Client implements CallbackClient {
|
|||
replayGame(callback.getObjectId());
|
||||
}
|
||||
else if (callback.getMethod().equals("watchGame")) {
|
||||
watchGame((UUID) callback.getData());
|
||||
watchGame((UUID) callback.getObjectId());
|
||||
}
|
||||
else if (callback.getMethod().equals("chatMessage")) {
|
||||
ChatMessage message = (ChatMessage) callback.getData();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue