* UI: added preferences to enable or disable turn number and step info in game logs;

This commit is contained in:
Oleg Agafonov 2020-02-28 21:04:37 +04:00
parent 2e73f9d1c5
commit 8ee1dd20d3
5 changed files with 393 additions and 463 deletions

View file

@ -1,34 +1,27 @@
package mage.client.chat;
import mage.client.MageFrame;
import mage.client.SessionHandler;
import mage.client.dialog.PreferencesDialog;
import mage.client.util.GUISizeHelper;
import mage.view.ChatMessage.MessageColor;
import mage.view.ChatMessage.MessageType;
import org.mage.card.arcane.ManaSymbols;
/* import javax.swing.*;
* ChatPanel.java import java.awt.*;
* import java.awt.event.KeyEvent;
* Created on 15-Dec-2009, 11:04:31 PM import java.text.DateFormat;
*/ import java.util.Date;
package mage.client.chat; import java.util.Locale;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import mage.client.MageFrame; /**
import mage.client.SessionHandler;
import mage.client.dialog.PreferencesDialog;
import mage.client.util.GUISizeHelper;
import mage.view.ChatMessage.MessageColor;
import mage.view.ChatMessage.MessageType;
import org.mage.card.arcane.ManaSymbols;
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author BetaSteward_at_googlemail.com, nantuko * @author BetaSteward_at_googlemail.com, nantuko
*/ */
public class ChatPanelBasic extends javax.swing.JPanel { public class ChatPanelBasic extends javax.swing.JPanel {
/** /**
* Time formatter * Time formatter
@ -219,7 +212,7 @@
public void receiveMessage(String username, String message, Date time, String turnInfo, MessageType messageType, MessageColor color) { public void receiveMessage(String username, String message, Date time, String turnInfo, MessageType messageType, MessageColor color) {
StringBuilder text = new StringBuilder(); StringBuilder text = new StringBuilder();
if (time != null) { if (time != null) {
text.append(getColoredText(TIMESTAMP_COLOR, timeFormatter.format(time) + (turnInfo == null ? "" : ", " + turnInfo) + ": ")); text.append(getColoredText(TIMESTAMP_COLOR, timeFormatter.format(time) + getTurnInfoPart(turnInfo) + ": "));
} }
String userColor; String userColor;
String textColor; String textColor;
@ -286,6 +279,11 @@
} }
} }
String getTurnInfoPart(String turnInfo) {
boolean canUse = Boolean.parseBoolean(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_LOG_SHOW_TURN_INFO, "true"));
return (turnInfo == null || !canUse ? "" : ", " + turnInfo);
}
protected String getColoredText(String color, String text) { protected String getColoredText(String color, String text) {
return "<font color='" + color + "'>" + text + "</font>"; return "<font color='" + color + "'>" + text + "</font>";
} }
@ -417,4 +415,4 @@
private mage.client.components.ColorPane txtConversation; private mage.client.components.ColorPane txtConversation;
private javax.swing.JTextField txtMessage; private javax.swing.JTextField txtMessage;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

View file

@ -55,7 +55,7 @@ public class ChatPanelSeparated extends ChatPanelBasic {
// message in game log // message in game log
if (time != null) { if (time != null) {
text.append(getColoredText(TIMESTAMP_COLOR, timeFormatter.format(time) + (turnInfo == null ? "" : ", " + turnInfo) + ": ")); text.append(getColoredText(TIMESTAMP_COLOR, timeFormatter.format(time) + getTurnInfoPart(turnInfo) + ": "));
} }
if (color == ChatMessage.MessageColor.ORANGE) { if (color == ChatMessage.MessageColor.ORANGE) {
textColor = "Orange"; textColor = "Orange";

View file

@ -98,7 +98,7 @@
<Component id="main_gamelog" min="-2" max="-2" attributes="0"/> <Component id="main_gamelog" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="main_battlefield" min="-2" max="-2" attributes="0"/> <Component id="main_battlefield" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="39" max="32767" attributes="0"/> <EmptySpace pref="23" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -117,43 +117,23 @@
</Property> </Property>
</Properties> </Properties>
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
<DimensionLayout dim="0"> <Property name="axis" type="int" value="3"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="cbDraftLogAutoSave" min="-2" max="-2" attributes="0"/>
<Component id="cbGameJsonLogAutoSave" min="-2" max="-2" attributes="0"/>
<Component id="cbGameLogAutoSave" alignment="0" min="-2" pref="505" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="cbGameLogAutoSave" alignment="1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="cbDraftLogAutoSave" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="cbGameJsonLogAutoSave" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JCheckBox" name="cbGameLogShowTurnInfo">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Show turn info in game logs (19:01 T2.DA: message)"/>
<Property name="toolTipText" type="java.lang.String" value="Add turn number and step info after time in game logs"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="cbGameLogAutoSave"> <Component class="javax.swing.JCheckBox" name="cbGameLogAutoSave">
<Properties> <Properties>
<Property name="selected" type="boolean" value="true"/> <Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Save game logs (to &quot;../Mage.Client/gamelogs/&quot; directory)"/> <Property name="text" type="java.lang.String" value="Save game logs (to &quot;../Mage.Client/gamelogs/&quot; directory)"/>
<Property name="toolTipText" type="java.lang.String" value="The logs of all your games will be saved to the mentioned folder if this option is switched on."/> <Property name="toolTipText" type="java.lang.String" value="The logs of all your games will be saved to the mentioned folder if this option is switched on."/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbGameLogAutoSaveActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JCheckBox" name="cbDraftLogAutoSave"> <Component class="javax.swing.JCheckBox" name="cbDraftLogAutoSave">
<Properties> <Properties>
@ -161,19 +141,12 @@
<Property name="text" type="java.lang.String" value="Save draft logs (to &quot;../Mage.Client/gamelogs/&quot; directory)"/> <Property name="text" type="java.lang.String" value="Save draft logs (to &quot;../Mage.Client/gamelogs/&quot; directory)"/>
<Property name="toolTipText" type="java.lang.String" value="The logs of all your games will be saved to the mentioned folder if this option is switched on."/> <Property name="toolTipText" type="java.lang.String" value="The logs of all your games will be saved to the mentioned folder if this option is switched on."/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbDraftLogAutoSaveActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JCheckBox" name="cbGameJsonLogAutoSave"> <Component class="javax.swing.JCheckBox" name="cbGameJsonLogAutoSave">
<Properties> <Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Save JSON game logs (to &quot;../Mage.Client/gamelogsJson/&quot; directory)"/> <Property name="text" type="java.lang.String" value="Save JSON game logs (to &quot;../Mage.Client/gamelogsJson/&quot; directory)"/>
<Property name="toolTipText" type="java.lang.String" value="The JSON logs of all your games will be saved to the mentioned folder if this option is switched on."/> <Property name="toolTipText" type="java.lang.String" value="The JSON logs of all your games will be saved to the mentioned folder if this option is switched on."/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbGameJsonLogAutoSaveActionPerformed"/>
</Events>
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>

View file

@ -13,7 +13,6 @@ import mage.players.net.UserGroup;
import mage.players.net.UserSkipPrioritySteps; import mage.players.net.UserSkipPrioritySteps;
import mage.remote.Connection; import mage.remote.Connection;
import mage.remote.Connection.ProxyType; import mage.remote.Connection.ProxyType;
import mage.remote.Session;
import mage.view.UserRequestMessage; import mage.view.UserRequestMessage;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -71,6 +70,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
public static final String KEY_GUI_CARD_BATTLEFIELD_MIN_SIZE = "guiCardBattlefieldMinSize"; public static final String KEY_GUI_CARD_BATTLEFIELD_MIN_SIZE = "guiCardBattlefieldMinSize";
public static final String KEY_GUI_CARD_BATTLEFIELD_MAX_SIZE = "guiCardBattlefieldMaxSize"; public static final String KEY_GUI_CARD_BATTLEFIELD_MAX_SIZE = "guiCardBattlefieldMaxSize";
public static final String KEY_GAME_LOG_SHOW_TURN_INFO = "gameLogShowTurnInfo";
public static final String KEY_GAME_LOG_AUTO_SAVE = "gameLogAutoSave"; public static final String KEY_GAME_LOG_AUTO_SAVE = "gameLogAutoSave";
public static final String KEY_DRAFT_LOG_AUTO_SAVE = "draftLogAutoSave"; public static final String KEY_DRAFT_LOG_AUTO_SAVE = "draftLogAutoSave";
public static final String KEY_JSON_GAME_LOG_AUTO_SAVE = "gameLogJsonAutoSave"; public static final String KEY_JSON_GAME_LOG_AUTO_SAVE = "gameLogJsonAutoSave";
@ -378,6 +378,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
tabsPanel = new javax.swing.JTabbedPane(); tabsPanel = new javax.swing.JTabbedPane();
tabMain = new javax.swing.JPanel(); tabMain = new javax.swing.JPanel();
main_gamelog = new javax.swing.JPanel(); main_gamelog = new javax.swing.JPanel();
cbGameLogShowTurnInfo = new javax.swing.JCheckBox();
cbGameLogAutoSave = new javax.swing.JCheckBox(); cbGameLogAutoSave = new javax.swing.JCheckBox();
cbDraftLogAutoSave = new javax.swing.JCheckBox(); cbDraftLogAutoSave = new javax.swing.JCheckBox();
cbGameJsonLogAutoSave = new javax.swing.JCheckBox(); cbGameJsonLogAutoSave = new javax.swing.JCheckBox();
@ -576,56 +577,26 @@ public class PreferencesDialog extends javax.swing.JDialog {
tabsPanel.setMinimumSize(new java.awt.Dimension(532, 451)); tabsPanel.setMinimumSize(new java.awt.Dimension(532, 451));
main_gamelog.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game log")); main_gamelog.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game log"));
main_gamelog.setLayout(new javax.swing.BoxLayout(main_gamelog, javax.swing.BoxLayout.PAGE_AXIS));
cbGameLogShowTurnInfo.setSelected(true);
cbGameLogShowTurnInfo.setText("Show turn info in game logs (19:01 T2.DA: message)");
cbGameLogShowTurnInfo.setToolTipText("Add turn number and step info after time in game logs");
main_gamelog.add(cbGameLogShowTurnInfo);
cbGameLogAutoSave.setSelected(true); cbGameLogAutoSave.setSelected(true);
cbGameLogAutoSave.setText("Save game logs (to \"../Mage.Client/gamelogs/\" directory)"); cbGameLogAutoSave.setText("Save game logs (to \"../Mage.Client/gamelogs/\" directory)");
cbGameLogAutoSave.setToolTipText("The logs of all your games will be saved to the mentioned folder if this option is switched on."); cbGameLogAutoSave.setToolTipText("The logs of all your games will be saved to the mentioned folder if this option is switched on.");
cbGameLogAutoSave.addActionListener(new java.awt.event.ActionListener() { main_gamelog.add(cbGameLogAutoSave);
public void actionPerformed(java.awt.event.ActionEvent evt) {
cbGameLogAutoSaveActionPerformed(evt);
}
});
cbDraftLogAutoSave.setSelected(true); cbDraftLogAutoSave.setSelected(true);
cbDraftLogAutoSave.setText("Save draft logs (to \"../Mage.Client/gamelogs/\" directory)"); cbDraftLogAutoSave.setText("Save draft logs (to \"../Mage.Client/gamelogs/\" directory)");
cbDraftLogAutoSave.setToolTipText("The logs of all your games will be saved to the mentioned folder if this option is switched on."); cbDraftLogAutoSave.setToolTipText("The logs of all your games will be saved to the mentioned folder if this option is switched on.");
cbDraftLogAutoSave.addActionListener(new java.awt.event.ActionListener() { main_gamelog.add(cbDraftLogAutoSave);
public void actionPerformed(java.awt.event.ActionEvent evt) {
cbDraftLogAutoSaveActionPerformed(evt);
}
});
cbGameJsonLogAutoSave.setSelected(true);
cbGameJsonLogAutoSave.setText("Save JSON game logs (to \"../Mage.Client/gamelogsJson/\" directory)"); cbGameJsonLogAutoSave.setText("Save JSON game logs (to \"../Mage.Client/gamelogsJson/\" directory)");
cbGameJsonLogAutoSave.setToolTipText("The JSON logs of all your games will be saved to the mentioned folder if this option is switched on."); cbGameJsonLogAutoSave.setToolTipText("The JSON logs of all your games will be saved to the mentioned folder if this option is switched on.");
cbGameJsonLogAutoSave.addActionListener(new java.awt.event.ActionListener() { main_gamelog.add(cbGameJsonLogAutoSave);
public void actionPerformed(java.awt.event.ActionEvent evt) {
cbGameJsonLogAutoSaveActionPerformed(evt);
}
});
org.jdesktop.layout.GroupLayout main_gamelogLayout = new org.jdesktop.layout.GroupLayout(main_gamelog);
main_gamelog.setLayout(main_gamelogLayout);
main_gamelogLayout.setHorizontalGroup(
main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(main_gamelogLayout.createSequentialGroup()
.addContainerGap()
.add(main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(cbDraftLogAutoSave)
.add(cbGameJsonLogAutoSave)
.add(cbGameLogAutoSave, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 505, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
main_gamelogLayout.setVerticalGroup(
main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(main_gamelogLayout.createSequentialGroup()
.add(cbGameLogAutoSave)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(cbDraftLogAutoSave)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(cbGameJsonLogAutoSave)
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
main_card.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card")); main_card.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card"));
@ -869,7 +840,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(main_gamelog, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(main_gamelog, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(main_battlefield, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(main_battlefield, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(39, Short.MAX_VALUE)) .addContainerGap(23, Short.MAX_VALUE))
); );
main_card.getAccessibleContext().setAccessibleName("Game panel"); main_card.getAccessibleContext().setAccessibleName("Game panel");
@ -2758,6 +2729,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
save(prefs, dialog.cbShowStormCounter, KEY_GAME_SHOW_STORM_COUNTER, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbShowStormCounter, KEY_GAME_SHOW_STORM_COUNTER, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbConfirmEmptyManaPool, KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbConfirmEmptyManaPool, KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbAskMoveToGraveOrder, KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbAskMoveToGraveOrder, KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbGameLogShowTurnInfo, KEY_GAME_LOG_SHOW_TURN_INFO, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbDraftLogAutoSave, KEY_DRAFT_LOG_AUTO_SAVE, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbDraftLogAutoSave, KEY_DRAFT_LOG_AUTO_SAVE, "true", "false", UPDATE_CACHE_POLICY);
save(prefs, dialog.cbGameJsonLogAutoSave, KEY_JSON_GAME_LOG_AUTO_SAVE, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbGameJsonLogAutoSave, KEY_JSON_GAME_LOG_AUTO_SAVE, "true", "false", UPDATE_CACHE_POLICY);
@ -3078,10 +3050,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
} }
}//GEN-LAST:event_btnBattlefieldBGMBrowseActionPerformed }//GEN-LAST:event_btnBattlefieldBGMBrowseActionPerformed
private void cbGameLogAutoSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbGameLogAutoSaveActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbGameLogAutoSaveActionPerformed
private void nonLandPermanentsInOnePileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nonLandPermanentsInOnePileActionPerformed private void nonLandPermanentsInOnePileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nonLandPermanentsInOnePileActionPerformed
}//GEN-LAST:event_nonLandPermanentsInOnePileActionPerformed }//GEN-LAST:event_nonLandPermanentsInOnePileActionPerformed
@ -3142,10 +3110,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
// TODO add your handling code here: // TODO add your handling code here:
}//GEN-LAST:event_cbAskMoveToGraveOrderActionPerformed }//GEN-LAST:event_cbAskMoveToGraveOrderActionPerformed
private void cbDraftLogAutoSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbDraftLogAutoSaveActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbDraftLogAutoSaveActionPerformed
private void cbPassPriorityCastActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPassPriorityCastActionPerformed private void cbPassPriorityCastActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPassPriorityCastActionPerformed
// TODO add your handling code here: // TODO add your handling code here:
}//GEN-LAST:event_cbPassPriorityCastActionPerformed }//GEN-LAST:event_cbPassPriorityCastActionPerformed
@ -3187,13 +3151,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
}//GEN-LAST:event_cbBattlefieldFeedbackColorizingModeActionPerformed }//GEN-LAST:event_cbBattlefieldFeedbackColorizingModeActionPerformed
private void cbGameJsonLogAutoSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbGameJsonLogAutoSaveActionPerformed
Session session = SessionHandler.getSession();
if (session != null) {
session.setJsonLogActive(cbGameJsonLogAutoSave.isSelected());
}
}//GEN-LAST:event_cbGameJsonLogAutoSaveActionPerformed
private void displayLifeOnAvatarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_displayLifeOnAvatarActionPerformed private void displayLifeOnAvatarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_displayLifeOnAvatarActionPerformed
// TODO add your handling code here: // TODO add your handling code here:
}//GEN-LAST:event_displayLifeOnAvatarActionPerformed }//GEN-LAST:event_displayLifeOnAvatarActionPerformed
@ -3340,6 +3297,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
load(prefs, dialog.cbConfirmEmptyManaPool, KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true"); load(prefs, dialog.cbConfirmEmptyManaPool, KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true");
load(prefs, dialog.cbAskMoveToGraveOrder, KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true"); load(prefs, dialog.cbAskMoveToGraveOrder, KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true");
load(prefs, dialog.cbGameLogShowTurnInfo, KEY_GAME_LOG_SHOW_TURN_INFO, "true");
load(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true"); load(prefs, dialog.cbGameLogAutoSave, KEY_GAME_LOG_AUTO_SAVE, "true");
load(prefs, dialog.cbDraftLogAutoSave, KEY_DRAFT_LOG_AUTO_SAVE, "true"); load(prefs, dialog.cbDraftLogAutoSave, KEY_DRAFT_LOG_AUTO_SAVE, "true");
load(prefs, dialog.cbGameJsonLogAutoSave, KEY_JSON_GAME_LOG_AUTO_SAVE, "true", "false"); load(prefs, dialog.cbGameJsonLogAutoSave, KEY_JSON_GAME_LOG_AUTO_SAVE, "true", "false");
@ -3944,6 +3902,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
private javax.swing.JCheckBox cbEnableSkipButtonsSounds; private javax.swing.JCheckBox cbEnableSkipButtonsSounds;
private javax.swing.JCheckBox cbGameJsonLogAutoSave; private javax.swing.JCheckBox cbGameJsonLogAutoSave;
private javax.swing.JCheckBox cbGameLogAutoSave; private javax.swing.JCheckBox cbGameLogAutoSave;
private javax.swing.JCheckBox cbGameLogShowTurnInfo;
private javax.swing.JComboBox cbNumberOfDownloadThreads; private javax.swing.JComboBox cbNumberOfDownloadThreads;
private javax.swing.JCheckBox cbPassPriorityActivation; private javax.swing.JCheckBox cbPassPriorityActivation;
private javax.swing.JCheckBox cbPassPriorityCast; private javax.swing.JCheckBox cbPassPriorityCast;

View file

@ -7,14 +7,14 @@ public enum PhaseStep {
UNTAP("Untap", 0, "untap step", "UN"), UNTAP("Untap", 0, "untap step", "UN"),
UPKEEP("Upkeep", 1, "upkeep", "UP"), // card texts don't use the word "step" for this phase step UPKEEP("Upkeep", 1, "upkeep", "UP"), // card texts don't use the word "step" for this phase step
DRAW("Draw", 2, "draw step", "DR"), DRAW("Draw", 2, "draw step", "DR"),
PRECOMBAT_MAIN("Precombat Main", 3, "precombat main step", "PM"), PRECOMBAT_MAIN("Precombat Main", 3, "precombat main step", "M1"),
BEGIN_COMBAT("Begin Combat", 4, "begin combat step", "BC"), BEGIN_COMBAT("Begin Combat", 4, "begin combat step", "BC"),
DECLARE_ATTACKERS("Declare Attackers", 5, "declare attackers step", "DA"), DECLARE_ATTACKERS("Declare Attackers", 5, "declare attackers step", "DA"),
DECLARE_BLOCKERS("Declare Blockers", 6, "declare blockers step", "DB"), DECLARE_BLOCKERS("Declare Blockers", 6, "declare blockers step", "DB"),
FIRST_COMBAT_DAMAGE("First Combat Damage", 7, "first combat damage", "FCD"), FIRST_COMBAT_DAMAGE("First Combat Damage", 7, "first combat damage", "FCD"),
COMBAT_DAMAGE("Combat Damage", 8, "combat damage step", "CD"), COMBAT_DAMAGE("Combat Damage", 8, "combat damage step", "CD"),
END_COMBAT("End Combat", 9, "end combat step", "EC"), END_COMBAT("End Combat", 9, "end combat step", "EC"),
POSTCOMBAT_MAIN("Postcombat Main", 10, "postcombat main step", "PM"), POSTCOMBAT_MAIN("Postcombat Main", 10, "postcombat main step", "M2"),
END_TURN("End Turn", 11, "end turn step", "ET"), END_TURN("End Turn", 11, "end turn step", "ET"),
CLEANUP("Cleanup", 12, "cleanup step", "CL"); CLEANUP("Cleanup", 12, "cleanup step", "CL");