forked from External/mage
Added an option that player has to confirm if he passes priority with empty stack and has mana in his pool. Implements #707.
This commit is contained in:
parent
907ec7abb0
commit
9da44a547d
16 changed files with 187 additions and 61 deletions
|
|
@ -221,12 +221,18 @@ public class HelperPanel extends JPanel {
|
|||
|
||||
public void setMessage(String message) {
|
||||
if (message.startsWith("Use alternative cost")) {
|
||||
textArea.setText("Use alternative cost?");
|
||||
} else if (message.length() > 40 && message.contains("Use ")) {
|
||||
textArea.setText("Use ability?");
|
||||
} else {
|
||||
textArea.setText(message);
|
||||
}
|
||||
message = "Use alternative cost?";
|
||||
} else if (message.contains("Use ")) {
|
||||
if (message.length() < this.getWidth() / 10) {
|
||||
message = getSmallText(message);
|
||||
} else {
|
||||
message = "Use ability?" + getSmallText(message.substring(this.getWidth() / 10));
|
||||
}
|
||||
}
|
||||
textArea.setText(message);
|
||||
}
|
||||
protected String getSmallText(String text) {
|
||||
return "<div style='font-size:11pt'>" + text + "</div>";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue