forked from External/mage
* Setting of mana automatic payment option is saved and restored now so persistent between games (fixes #1002).
This commit is contained in:
parent
3b9cb1dc6e
commit
a50447c84d
3 changed files with 11 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ import mage.client.MageFrame;
|
|||
import mage.client.cards.BigCard;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import static mage.client.dialog.PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS;
|
||||
import static mage.client.dialog.PreferencesDialog.KEY_GAME_MANA_AUTOPAYMENT;
|
||||
import mage.constants.PlayerAction;
|
||||
import mage.view.PlayerView;
|
||||
|
||||
|
|
@ -220,6 +221,7 @@ public class PlayAreaPanel extends javax.swing.JPanel {
|
|||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
boolean manaPoolAutomatic = ((JCheckBoxMenuItem)e.getSource()).getState();
|
||||
PreferencesDialog.saveValue(KEY_GAME_MANA_AUTOPAYMENT, manaPoolAutomatic ? "true": "false");
|
||||
gamePanel.setMenuStates(manaPoolAutomatic);
|
||||
gamePanel.getSession().sendPlayerAction(manaPoolAutomatic ? PlayerAction.MANA_AUTO_PAYMENT_ON: PlayerAction.MANA_AUTO_PAYMENT_OFF, gameId, null);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue