forked from External/mage
Fixed issue #135 that cards with miracle were always shown on the stack if it was possible to cast them with miracle also if the owner of the card dicided not to use the miracle ability. Minor formating.
This commit is contained in:
parent
8d3796ef7a
commit
e4145c90b5
3 changed files with 31 additions and 22 deletions
|
|
@ -28,10 +28,10 @@
|
|||
|
||||
package mage.client.game;
|
||||
|
||||
import mage.client.components.MageTextArea;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import mage.client.components.MageTextArea;
|
||||
|
||||
/**
|
||||
* Panel with buttons that copy the state of feedback panel.
|
||||
|
|
@ -91,6 +91,7 @@ public class HelperPanel extends JPanel {
|
|||
container.add(btnRight);
|
||||
|
||||
btnLeft.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
if (linkLeft != null) {{
|
||||
setState("",false,"",false);
|
||||
|
|
@ -101,6 +102,7 @@ public class HelperPanel extends JPanel {
|
|||
});
|
||||
|
||||
btnRight.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
if (linkRight != null) {{
|
||||
setState("",false,"",false);
|
||||
|
|
@ -111,6 +113,7 @@ public class HelperPanel extends JPanel {
|
|||
});
|
||||
|
||||
btnSpecial.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
if (linkSpecial != null) {{
|
||||
setState("",false,"",false);
|
||||
|
|
@ -153,13 +156,14 @@ public class HelperPanel extends JPanel {
|
|||
public void setMessage(String message) {
|
||||
if (message.startsWith("Use alternative cost")) {
|
||||
textArea.setText("Use alternative cost?");
|
||||
} else if (message.contains("Use")) {
|
||||
} else if (message.length() > 30 && message.contains("Use")) {
|
||||
textArea.setText("Use ability?");
|
||||
} else {
|
||||
textArea.setText(message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestFocus() {
|
||||
this.btnRight.requestFocus();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue