mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
gui: fixed broken watcher view mode (closes #11481)
This commit is contained in:
parent
6a1f4a35d4
commit
2eac541b80
8 changed files with 125 additions and 41 deletions
|
|
@ -10,7 +10,6 @@ import javax.swing.event.DocumentListener;
|
|||
|
||||
import mage.abilities.hint.HintUtils;
|
||||
import mage.client.cards.BigCard;
|
||||
import mage.client.chat.ChatPanelBasic;
|
||||
import mage.client.components.MageDesktopIconifySupport;
|
||||
import mage.client.util.GUISizeHelper;
|
||||
import mage.client.util.SettingsManager;
|
||||
|
|
@ -232,7 +231,7 @@ public class CardHintsHelperDialog extends MageDialog implements MageDesktopIcon
|
|||
.orElse(null);
|
||||
|
||||
// hand
|
||||
this.lastGameView.getHand().values().forEach(card -> {
|
||||
this.lastGameView.getMyHand().values().forEach(card -> {
|
||||
this.lastHints.add(new CardHintInfo(currentPlayer, "hand", card));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
return;
|
||||
}
|
||||
|
||||
this.game.getHand().values().forEach(c -> this.allCardsIndex.put(c.getId(), c));
|
||||
this.game.getMyHand().values().forEach(c -> this.allCardsIndex.put(c.getId(), c));
|
||||
this.game.getStack().values().forEach(c -> this.allCardsIndex.put(c.getId(), c));
|
||||
this.game.getExile()
|
||||
.stream()
|
||||
|
|
@ -789,7 +789,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
if (playerId != null) {
|
||||
handCards.put(YOUR_HAND, lastGameData.game.getHand());
|
||||
handCards.put(YOUR_HAND, lastGameData.game.getMyHand());
|
||||
// Get opponents hand cards if available (only possible for players)
|
||||
if (lastGameData.game.getOpponentHands() != null) {
|
||||
for (Map.Entry<String, SimpleCardsView> hand : lastGameData.game.getOpponentHands().entrySet()) {
|
||||
|
|
@ -811,7 +811,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (playerId != null) {
|
||||
// set visible only if we have any other hand visible than ours
|
||||
btnSwitchHands.setVisible(handCards.size() > 1);
|
||||
boolean change = (handCardsOfOpponentAvailable != (lastGameData.game.getOpponentHands() != null));
|
||||
boolean change = (handCardsOfOpponentAvailable == (lastGameData.game.getOpponentHands() == null));
|
||||
if (change) {
|
||||
handCardsOfOpponentAvailable = !handCardsOfOpponentAvailable;
|
||||
if (handCardsOfOpponentAvailable) {
|
||||
|
|
@ -1507,7 +1507,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
|
||||
// hand
|
||||
if (needZone == Zone.HAND || needZone == Zone.ALL) {
|
||||
for (CardView card : lastGameData.game.getHand().values()) {
|
||||
for (CardView card : lastGameData.game.getMyHand().values()) {
|
||||
if (needSelectable.contains(card.getId())) {
|
||||
card.setChoosable(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue