* Fixed visibility of buttons with empty text (fixes #6841).

This commit is contained in:
LevelX2 2020-07-20 11:12:33 +02:00
parent 6fd304ec5f
commit 881f727ec7
2 changed files with 19 additions and 20 deletions

View file

@ -1,6 +1,4 @@
/*
/*
* FeedbackPanel.java
*
* Created on 23-Dec-2009, 9:54:01 PM
@ -187,12 +185,12 @@ public class FeedbackPanel extends javax.swing.JPanel {
if (options.containsKey("UI.left.btn.text")) {
String text = (String) options.get("UI.left.btn.text");
this.btnLeft.setText(text);
this.helper.setLeft(text, true);
this.helper.setLeft(text, !text.isEmpty());
}
if (options.containsKey("UI.right.btn.text")) {
String text = (String) options.get("UI.right.btn.text");
this.btnRight.setText(text);
this.helper.setRight(text, true);
this.helper.setRight(text, !text.isEmpty());
}
if (options.containsKey("dialog")) {
connectedDialog = (MageDialog) options.get("dialog");

View file

@ -1,5 +1,7 @@
package mage.cards.s;
import java.util.Optional;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
@ -15,9 +17,6 @@ import mage.players.Player;
import mage.target.common.TargetOpponent;
import mage.util.CardUtil;
import java.util.Optional;
import java.util.UUID;
/**
* @author TheElk801
*/
@ -69,7 +68,9 @@ class SorcerousSpyglassEntersEffect extends ChooseACardNameEffect {
if (opponent != null) {
MageObject sourceObject = game.getObject(source.getSourceId());
player.lookAtCards(sourceObject != null ? sourceObject.getIdName() : null, opponent.getHand(), game);
player.chooseUse(Outcome.Benefit, "Press ok to name a card", "You won't be able to resize the window once you do", "Ok", " ", source, game);
player.chooseUse(Outcome.Benefit, "Press Ok to name a card",
"You won't be able to resize the window showing opponents hand once you do",
"Ok", "", source, game);
}
}
}