forked from External/mage
* GUI: added auto-choose for replacement effects (remember answer in dialog + reset answer in popup menu + new option in preferences; #4360, #328, #4219, #6676, #7914);
This commit is contained in:
parent
c081d3fa33
commit
c9ab896d24
11 changed files with 311 additions and 77 deletions
|
|
@ -134,6 +134,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static final String KEY_PASS_PRIORITY_CAST = "passPriorityCast";
|
||||
public static final String KEY_PASS_PRIORITY_ACTIVATION = "passPriorityActivation";
|
||||
public static final String KEY_AUTO_ORDER_TRIGGER = "autoOrderTrigger";
|
||||
public static final String KEY_USE_SAME_SETTINGS_FOR_SAME_REPLACEMENT_EFFECTS = "useSameSettingsForSameReplacementEffects";
|
||||
public static final String KEY_USE_FIRST_MANA_ABILITY = "useFirstManaAbility";
|
||||
|
||||
// mana auto payment
|
||||
|
|
@ -501,6 +502,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
cbPassPriorityCast = new javax.swing.JCheckBox();
|
||||
cbPassPriorityActivation = new javax.swing.JCheckBox();
|
||||
cbAutoOrderTrigger = new javax.swing.JCheckBox();
|
||||
cbUseSameSettingsForReplacementEffect = new javax.swing.JCheckBox();
|
||||
tabImages = new javax.swing.JPanel();
|
||||
panelCardImages = new javax.swing.JPanel();
|
||||
cbUseDefaultImageFolder = new javax.swing.JCheckBox();
|
||||
|
|
@ -1405,7 +1407,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
jLabelEndOfTurn.setText("End of turn:");
|
||||
|
||||
phases_stopSettings.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "SKIP settings"));
|
||||
phases_stopSettings.setLayout(new java.awt.GridLayout(9, 1));
|
||||
phases_stopSettings.setLayout(new java.awt.GridLayout(10, 1));
|
||||
|
||||
cbStopAttack.setSelected(true);
|
||||
cbStopAttack.setText("STOP skips on declare attackers if attackers are available");
|
||||
|
|
@ -1493,8 +1495,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
});
|
||||
phases_stopSettings.add(cbPassPriorityActivation);
|
||||
|
||||
cbAutoOrderTrigger.setText("Set order for your triggers automatically if all have the same text");
|
||||
cbAutoOrderTrigger.setToolTipText("<HTML>If activated the order to put on the stack your triggers that trigger at the same time<br/>\nis set automatically if all have the same text.");
|
||||
cbAutoOrderTrigger.setText("TRIGGERS: auto-choose triggers order for same rule texts (put same triggers to the stack at default order)");
|
||||
cbAutoOrderTrigger.setToolTipText("<HTML>If you put same triggers with same texts on the stack then auto-choose their order.<br/>\nYou can change that settings anytime at the game.");
|
||||
cbAutoOrderTrigger.setActionCommand("");
|
||||
cbAutoOrderTrigger.setPreferredSize(new java.awt.Dimension(300, 25));
|
||||
cbAutoOrderTrigger.addActionListener(new java.awt.event.ActionListener() {
|
||||
|
|
@ -1504,6 +1506,17 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
});
|
||||
phases_stopSettings.add(cbAutoOrderTrigger);
|
||||
|
||||
cbUseSameSettingsForReplacementEffect.setText("REPLACEMENT EFFECTS: use same auto-choose settings for same cards (choose replacement effects order dialog)");
|
||||
cbUseSameSettingsForReplacementEffect.setToolTipText("<HTML>If you setup auto-choose for one object/card then it will be applied for all other objects with same name.<br/>\nYou can change that settings anytime at the game.");
|
||||
cbUseSameSettingsForReplacementEffect.setActionCommand("");
|
||||
cbUseSameSettingsForReplacementEffect.setPreferredSize(new java.awt.Dimension(300, 25));
|
||||
cbUseSameSettingsForReplacementEffect.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbUseSameSettingsForReplacementEffectActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
phases_stopSettings.add(cbUseSameSettingsForReplacementEffect);
|
||||
|
||||
org.jdesktop.layout.GroupLayout tabPhasesLayout = new org.jdesktop.layout.GroupLayout(tabPhases);
|
||||
tabPhases.setLayout(tabPhasesLayout);
|
||||
tabPhasesLayout.setHorizontalGroup(
|
||||
|
|
@ -1614,8 +1627,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.add(jLabelEndOfTurn)
|
||||
.add(checkBoxEndTurnOthers))
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
|
||||
.add(phases_stopSettings, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.add(phases_stopSettings, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
tabsPanel.addTab("Phases & Priority", tabPhases);
|
||||
|
|
@ -2925,6 +2938,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
save(prefs, dialog.cbPassPriorityCast, KEY_PASS_PRIORITY_CAST, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.cbPassPriorityActivation, KEY_PASS_PRIORITY_ACTIVATION, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.cbAutoOrderTrigger, KEY_AUTO_ORDER_TRIGGER, "true", "false", UPDATE_CACHE_POLICY);
|
||||
save(prefs, dialog.cbUseSameSettingsForReplacementEffect, KEY_USE_SAME_SETTINGS_FOR_SAME_REPLACEMENT_EFFECTS, "true", "false", UPDATE_CACHE_POLICY);
|
||||
|
||||
// images
|
||||
save(prefs, dialog.cbUseDefaultImageFolder, KEY_CARD_IMAGES_USE_DEFAULT, "true", "false", UPDATE_CACHE_POLICY);
|
||||
|
|
@ -3309,6 +3323,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
}
|
||||
}//GEN-LAST:event_sliderGUISizeStateChanged
|
||||
|
||||
private void cbUseSameSettingsForReplacementEffectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbUseSameSettingsForReplacementEffectActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_cbUseSameSettingsForReplacementEffectActionPerformed
|
||||
|
||||
private void showProxySettings() {
|
||||
Connection.ProxyType proxyType = (Connection.ProxyType) cbProxyType.getSelectedItem();
|
||||
switch (proxyType) {
|
||||
|
|
@ -3465,7 +3483,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
load(prefs, dialog.cbPassPriorityCast, KEY_PASS_PRIORITY_CAST, "true", "false");
|
||||
load(prefs, dialog.cbPassPriorityActivation, KEY_PASS_PRIORITY_ACTIVATION, "true", "false");
|
||||
load(prefs, dialog.cbAutoOrderTrigger, KEY_AUTO_ORDER_TRIGGER, "true", "true");
|
||||
|
||||
load(prefs, dialog.cbUseSameSettingsForReplacementEffect, KEY_USE_SAME_SETTINGS_FOR_SAME_REPLACEMENT_EFFECTS, "true", "true");
|
||||
}
|
||||
|
||||
private static void loadGuiSize(Preferences prefs) {
|
||||
|
|
@ -3996,6 +4014,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PASS_PRIORITY_CAST, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PASS_PRIORITY_ACTIVATION, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_AUTO_ORDER_TRIGGER, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_USE_SAME_SETTINGS_FOR_SAME_REPLACEMENT_EFFECTS, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_USE_FIRST_MANA_ABILITY, "false").equals("true"),
|
||||
userStrId
|
||||
);
|
||||
|
|
@ -4069,6 +4088,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JCheckBox cbUseDefaultBattleImage;
|
||||
private javax.swing.JCheckBox cbUseDefaultImageFolder;
|
||||
private javax.swing.JCheckBox cbUseRandomBattleImage;
|
||||
private javax.swing.JCheckBox cbUseSameSettingsForReplacementEffect;
|
||||
private javax.swing.JLabel chatFontSizeLabel;
|
||||
private javax.swing.JCheckBox checkBoxBeforeCOthers;
|
||||
private javax.swing.JCheckBox checkBoxBeforeCYou;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue