mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Merge origin/master
This commit is contained in:
commit
ae6f177823
4 changed files with 268 additions and 106 deletions
|
@ -113,6 +113,11 @@ public final class Constants {
|
||||||
public static final String BASE_SOUND_PATH = "sounds" + File.separator; // TODO: check path with File.separator
|
public static final String BASE_SOUND_PATH = "sounds" + File.separator; // TODO: check path with File.separator
|
||||||
public static final String BASE_MUSICS_PATH = "music" + File.separator;
|
public static final String BASE_MUSICS_PATH = "music" + File.separator;
|
||||||
|
|
||||||
|
// battlefield feedback panel colors (used in preferences dialogs too)
|
||||||
|
public static final int BATTLEFIELD_FEEDBACK_COLORIZING_MODE_DISABLE = 0;
|
||||||
|
public static final int BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_ONE_COLOR = 1;
|
||||||
|
public static final int BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR = 2;
|
||||||
|
|
||||||
public interface IO {
|
public interface IO {
|
||||||
String DEFAULT_IMAGES_DIR = "plugins" + File.separator + "images" + File.separator;
|
String DEFAULT_IMAGES_DIR = "plugins" + File.separator + "images" + File.separator;
|
||||||
String IMAGE_PROPERTIES_FILE = "image.url.properties";
|
String IMAGE_PROPERTIES_FILE = "image.url.properties";
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
<Component id="main_card" alignment="1" max="32767" attributes="0"/>
|
<Component id="main_card" alignment="1" max="32767" attributes="0"/>
|
||||||
<Component id="main_gamelog" alignment="1" max="32767" attributes="0"/>
|
<Component id="main_gamelog" alignment="1" max="32767" attributes="0"/>
|
||||||
<Component id="main_game" alignment="0" max="32767" attributes="0"/>
|
<Component id="main_game" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="main_battlefield" alignment="1" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -94,12 +95,73 @@
|
||||||
<Component id="main_game" min="-2" max="-2" attributes="0"/>
|
<Component id="main_game" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="main_gamelog" min="-2" max="-2" attributes="0"/>
|
<Component id="main_gamelog" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="main_battlefield" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="154" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
|
<Container class="javax.swing.JPanel" name="main_gamelog">
|
||||||
|
<Properties>
|
||||||
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
|
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||||
|
<TitledBorder title="Game log">
|
||||||
|
<Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||||
|
<EtchetBorder/>
|
||||||
|
</Border>
|
||||||
|
</TitledBorder>
|
||||||
|
</Border>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
|
<Component id="cbDraftLogAutoSave" max="32767" attributes="0"/>
|
||||||
|
<Component id="cbGameLogAutoSave" max="32767" 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" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="cbGameLogAutoSave">
|
||||||
|
<Properties>
|
||||||
|
<Property name="selected" type="boolean" value="true"/>
|
||||||
|
<Property name="text" type="java.lang.String" value="Auto save game logs (to "../Mage.Client/gamelogs/" 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."/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbGameLogAutoSaveActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="cbDraftLogAutoSave">
|
||||||
|
<Properties>
|
||||||
|
<Property name="selected" type="boolean" value="true"/>
|
||||||
|
<Property name="text" type="java.lang.String" value="Auto save draft logs (to "../Mage.Client/gamelogs/" 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."/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbDraftLogAutoSaveActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
<Container class="javax.swing.JPanel" name="main_card">
|
<Container class="javax.swing.JPanel" name="main_card">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
|
@ -159,7 +221,7 @@
|
||||||
<Property name="toolTipText" type="java.lang.String" value="Write the card's name on the card to make the card name more recognizable."/>
|
<Property name="toolTipText" type="java.lang.String" value="Write the card's name on the card to make the card name more recognizable."/>
|
||||||
<Property name="actionCommand" type="java.lang.String" value=""/>
|
<Property name="actionCommand" type="java.lang.String" value=""/>
|
||||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||||
<Color id="Standardcursor"/>
|
<Color id="Default Cursor"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
<Events>
|
||||||
|
@ -189,16 +251,11 @@
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
<Property name="selected" type="boolean" value="true"/>
|
||||||
<Property name="toolTipText" type="java.lang.String" value="Show the path Xmage is expecting for this card's image (only displays if missing)"/>
|
<Property name="toolTipText" type="java.lang.String" value="Show the path Xmage is expecting for this card's image (only displays if missing)"/>
|
||||||
<Property name="actionCommand" type="java.lang.String" value=""/>
|
|
||||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||||
<Color id="Default Cursor"/>
|
<Color id="Default Cursor"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="label" type="java.lang.String" value="Display image path for missing images"/>
|
<Property name="label" type="java.lang.String" value="Display image path for missing images"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AccessibilityProperties>
|
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="Display image path for missing images"/>
|
|
||||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="Show the path Xmage is expecting for this card's image (only displays if missing)"/>
|
|
||||||
</AccessibilityProperties>
|
|
||||||
<Events>
|
<Events>
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showFullImagePathActionPerformed"/>
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="showFullImagePathActionPerformed"/>
|
||||||
</Events>
|
</Events>
|
||||||
|
@ -226,13 +283,13 @@
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
<Component id="showPlayerNamesPermanently" alignment="0" max="32767" attributes="0"/>
|
<Component id="showPlayerNamesPermanently" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="nonLandPermanentsInOnePile" alignment="0" max="32767" attributes="0"/>
|
<Component id="nonLandPermanentsInOnePile" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="showAbilityPickerForced" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="cbConfirmEmptyManaPool" alignment="0" max="32767" attributes="0"/>
|
<Component id="cbConfirmEmptyManaPool" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="cbAllowRequestToShowHandCards" alignment="0" max="32767" attributes="0"/>
|
<Component id="cbAllowRequestToShowHandCards" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="cbShowStormCounter" alignment="0" max="32767" attributes="0"/>
|
<Component id="cbShowStormCounter" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="cbAskMoveToGraveOrder" alignment="0" max="32767" attributes="0"/>
|
<Component id="cbAskMoveToGraveOrder" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="showAbilityPickerForced" alignment="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace pref="255" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
|
@ -339,11 +396,11 @@
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Container class="javax.swing.JPanel" name="main_gamelog">
|
<Container class="javax.swing.JPanel" name="main_battlefield">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||||
<TitledBorder title="Game log">
|
<TitledBorder title="Battlefield">
|
||||||
<Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
<Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||||
<EtchetBorder/>
|
<EtchetBorder/>
|
||||||
</Border>
|
</Border>
|
||||||
|
@ -355,46 +412,50 @@
|
||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Component id="lblBattlefieldFeedbackColorizingMode" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="cbDraftLogAutoSave" max="32767" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="cbGameLogAutoSave" max="32767" attributes="0"/>
|
<Component id="cbBattlefieldFeedbackColorizingMode" min="-2" pref="278" max="-2" attributes="0"/>
|
||||||
</Group>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="cbGameLogAutoSave" alignment="1" min="-2" max="-2" attributes="0"/>
|
<Component id="lblBattlefieldFeedbackColorizingMode" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<Component id="cbBattlefieldFeedbackColorizingMode" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="cbDraftLogAutoSave" alignment="1" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Component class="javax.swing.JCheckBox" name="cbGameLogAutoSave">
|
<Component class="javax.swing.JComboBox" name="cbBattlefieldFeedbackColorizingMode">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||||
<Property name="text" type="java.lang.String" value="Auto save game logs (to "../Mage.Client/gamelogs/" directory)"/>
|
<StringArray count="3">
|
||||||
<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."/>
|
<StringItem index="0" value="Disable colorizing"/>
|
||||||
|
<StringItem index="1" value="Enable one color for all phases"/>
|
||||||
|
<StringItem index="2" value="Enable multicolor for different phases"/>
|
||||||
|
</StringArray>
|
||||||
|
</Property>
|
||||||
|
<Property name="toolTipText" type="java.lang.String" value="Battlefield feedback panel colorizing on your turn (e.g. use green color if you must select card or answer to request)"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
<Events>
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbGameLogAutoSaveActionPerformed"/>
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbBattlefieldFeedbackColorizingModeActionPerformed"/>
|
||||||
</Events>
|
</Events>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value=""/>
|
||||||
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JCheckBox" name="cbDraftLogAutoSave">
|
<Component class="javax.swing.JLabel" name="lblBattlefieldFeedbackColorizingMode">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||||
<Property name="text" type="java.lang.String" value="Auto save draft logs (to "../Mage.Client/gamelogs/" directory)"/>
|
<ComponentRef name="cbBattlefieldFeedbackColorizingMode"/>
|
||||||
<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>
|
||||||
|
<Property name="text" type="java.lang.String" value="Feedback panel colorizing:"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbDraftLogAutoSaveActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
@ -69,6 +69,8 @@ import mage.client.util.Config;
|
||||||
import mage.client.util.GUISizeHelper;
|
import mage.client.util.GUISizeHelper;
|
||||||
import mage.client.util.ImageHelper;
|
import mage.client.util.ImageHelper;
|
||||||
import mage.client.util.gui.BufferedImageBuilder;
|
import mage.client.util.gui.BufferedImageBuilder;
|
||||||
|
|
||||||
|
import static mage.client.constants.Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR;
|
||||||
import static mage.constants.Constants.DEFAULT_AVATAR_ID;
|
import static mage.constants.Constants.DEFAULT_AVATAR_ID;
|
||||||
import static mage.constants.Constants.MAX_AVATAR_ID;
|
import static mage.constants.Constants.MAX_AVATAR_ID;
|
||||||
import static mage.constants.Constants.MIN_AVATAR_ID;
|
import static mage.constants.Constants.MIN_AVATAR_ID;
|
||||||
|
@ -101,6 +103,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
public static final String KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER = "gameAskMoveToGraveORder";
|
public static final String KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER = "gameAskMoveToGraveORder";
|
||||||
public static final String KEY_GAME_USE_PROFANITY_FILTER = "gameUseProfanityFilter";
|
public static final String KEY_GAME_USE_PROFANITY_FILTER = "gameUseProfanityFilter";
|
||||||
|
|
||||||
|
public static final String KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE = "battlefieldFeedbackColorizingMode";
|
||||||
|
|
||||||
public static final String KEY_GUI_TABLE_FONT_SIZE = "guiTableFontSize";
|
public static final String KEY_GUI_TABLE_FONT_SIZE = "guiTableFontSize";
|
||||||
public static final String KEY_GUI_CHAT_FONT_SIZE = "guiChatFontSize";
|
public static final String KEY_GUI_CHAT_FONT_SIZE = "guiChatFontSize";
|
||||||
public static final String KEY_GUI_CARD_HAND_SIZE = "guiCardHandSize";
|
public static final String KEY_GUI_CARD_HAND_SIZE = "guiCardHandSize";
|
||||||
|
@ -398,11 +402,14 @@ 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();
|
||||||
|
cbGameLogAutoSave = new javax.swing.JCheckBox();
|
||||||
|
cbDraftLogAutoSave = new javax.swing.JCheckBox();
|
||||||
main_card = new javax.swing.JPanel();
|
main_card = new javax.swing.JPanel();
|
||||||
showCardName = new javax.swing.JCheckBox();
|
showCardName = new javax.swing.JCheckBox();
|
||||||
showFullImagePath = new javax.swing.JCheckBox();
|
|
||||||
tooltipDelayLabel = new javax.swing.JLabel();
|
tooltipDelayLabel = new javax.swing.JLabel();
|
||||||
tooltipDelay = new javax.swing.JSlider();
|
tooltipDelay = new javax.swing.JSlider();
|
||||||
|
showFullImagePath = new javax.swing.JCheckBox();
|
||||||
main_game = new javax.swing.JPanel();
|
main_game = new javax.swing.JPanel();
|
||||||
nonLandPermanentsInOnePile = new javax.swing.JCheckBox();
|
nonLandPermanentsInOnePile = new javax.swing.JCheckBox();
|
||||||
showPlayerNamesPermanently = new javax.swing.JCheckBox();
|
showPlayerNamesPermanently = new javax.swing.JCheckBox();
|
||||||
|
@ -411,9 +418,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
cbShowStormCounter = new javax.swing.JCheckBox();
|
cbShowStormCounter = new javax.swing.JCheckBox();
|
||||||
cbConfirmEmptyManaPool = new javax.swing.JCheckBox();
|
cbConfirmEmptyManaPool = new javax.swing.JCheckBox();
|
||||||
cbAskMoveToGraveOrder = new javax.swing.JCheckBox();
|
cbAskMoveToGraveOrder = new javax.swing.JCheckBox();
|
||||||
main_gamelog = new javax.swing.JPanel();
|
main_battlefield = new javax.swing.JPanel();
|
||||||
cbGameLogAutoSave = new javax.swing.JCheckBox();
|
cbBattlefieldFeedbackColorizingMode = new javax.swing.JComboBox();
|
||||||
cbDraftLogAutoSave = new javax.swing.JCheckBox();
|
lblBattlefieldFeedbackColorizingMode = new javax.swing.JLabel();
|
||||||
tabGuiSize = new javax.swing.JPanel();
|
tabGuiSize = new javax.swing.JPanel();
|
||||||
guiSizeBasic = new javax.swing.JPanel();
|
guiSizeBasic = new javax.swing.JPanel();
|
||||||
sliderFontSize = new javax.swing.JSlider();
|
sliderFontSize = new javax.swing.JSlider();
|
||||||
|
@ -589,6 +596,45 @@ 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"));
|
||||||
|
|
||||||
|
cbGameLogAutoSave.setSelected(true);
|
||||||
|
cbGameLogAutoSave.setText("Auto 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.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
cbGameLogAutoSaveActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
cbDraftLogAutoSave.setSelected(true);
|
||||||
|
cbDraftLogAutoSave.setText("Auto 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.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
cbDraftLogAutoSaveActionPerformed(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, false)
|
||||||
|
.add(cbDraftLogAutoSave, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.add(cbGameLogAutoSave, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
.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))
|
||||||
|
);
|
||||||
|
|
||||||
main_card.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card"));
|
main_card.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card"));
|
||||||
|
|
||||||
showCardName.setSelected(true);
|
showCardName.setSelected(true);
|
||||||
|
@ -615,9 +661,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
tooltipDelay.setToolTipText("<HTML>The time the appearance of the tooltip window for a card is delayed.<br>\nIf set to zero, the tooltip window won't be shown at all.");
|
tooltipDelay.setToolTipText("<HTML>The time the appearance of the tooltip window for a card is delayed.<br>\nIf set to zero, the tooltip window won't be shown at all.");
|
||||||
tooltipDelay.setValue(300);
|
tooltipDelay.setValue(300);
|
||||||
|
|
||||||
showFullImagePath.setSelected(false);
|
showFullImagePath.setSelected(true);
|
||||||
showFullImagePath.setToolTipText("Show the path Xmage is expecting for this card's image (only displays if missing)");
|
showFullImagePath.setToolTipText("Show the path Xmage is expecting for this card's image (only displays if missing)");
|
||||||
showFullImagePath.setActionCommand("");
|
|
||||||
showFullImagePath.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
showFullImagePath.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||||
showFullImagePath.setLabel("Display image path for missing images");
|
showFullImagePath.setLabel("Display image path for missing images");
|
||||||
showFullImagePath.addActionListener(new java.awt.event.ActionListener() {
|
showFullImagePath.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
@ -634,7 +679,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
.add(6, 6, 6)
|
.add(6, 6, 6)
|
||||||
.add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
.add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||||
.add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
|
.add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
|
||||||
.add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE)
|
.add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, Short.MAX_VALUE)
|
||||||
.add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.add(main_cardLayout.createSequentialGroup()
|
.add(main_cardLayout.createSequentialGroup()
|
||||||
.add(showCardName)
|
.add(showCardName)
|
||||||
|
@ -654,9 +699,6 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
.add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
showFullImagePath.getAccessibleContext().setAccessibleName("Display image path for missing images");
|
|
||||||
showFullImagePath.getAccessibleContext().setAccessibleDescription("Show the path Xmage is expecting for this card's image (only displays if missing)");
|
|
||||||
|
|
||||||
main_game.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game"));
|
main_game.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game"));
|
||||||
|
|
||||||
nonLandPermanentsInOnePile.setSelected(true);
|
nonLandPermanentsInOnePile.setSelected(true);
|
||||||
|
@ -737,11 +779,11 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
.add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
|
.add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
|
||||||
.add(showPlayerNamesPermanently, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.add(showPlayerNamesPermanently, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.add(nonLandPermanentsInOnePile, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.add(nonLandPermanentsInOnePile, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.add(showAbilityPickerForced)
|
|
||||||
.add(cbConfirmEmptyManaPool, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.add(cbConfirmEmptyManaPool, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.add(cbAllowRequestToShowHandCards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.add(cbAllowRequestToShowHandCards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.add(cbShowStormCounter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.add(cbShowStormCounter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.add(cbAskMoveToGraveOrder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.add(cbAskMoveToGraveOrder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.add(showAbilityPickerForced, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addContainerGap(255, Short.MAX_VALUE))
|
.addContainerGap(255, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
main_gameLayout.setVerticalGroup(
|
main_gameLayout.setVerticalGroup(
|
||||||
|
@ -765,43 +807,35 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
|
|
||||||
nonLandPermanentsInOnePile.getAccessibleContext().setAccessibleName("nonLandPermanentsInOnePile");
|
nonLandPermanentsInOnePile.getAccessibleContext().setAccessibleName("nonLandPermanentsInOnePile");
|
||||||
|
|
||||||
main_gamelog.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game log"));
|
main_battlefield.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Battlefield"));
|
||||||
|
|
||||||
cbGameLogAutoSave.setSelected(true);
|
cbBattlefieldFeedbackColorizingMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Disable colorizing", "Enable one color for all phases", "Enable multicolor for different phases" }));
|
||||||
cbGameLogAutoSave.setText("Auto save game logs (to \"../Mage.Client/gamelogs/\" directory)");
|
cbBattlefieldFeedbackColorizingMode.setToolTipText("Battlefield feedback panel colorizing on your turn (e.g. use green color if you must select card or answer to request)");
|
||||||
cbGameLogAutoSave.setToolTipText("The logs of all your games will be saved to the mentioned folder if this option is switched on.");
|
cbBattlefieldFeedbackColorizingMode.addActionListener(new java.awt.event.ActionListener() {
|
||||||
cbGameLogAutoSave.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
cbGameLogAutoSaveActionPerformed(evt);
|
cbBattlefieldFeedbackColorizingModeActionPerformed(evt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cbDraftLogAutoSave.setSelected(true);
|
lblBattlefieldFeedbackColorizingMode.setLabelFor(cbBattlefieldFeedbackColorizingMode);
|
||||||
cbDraftLogAutoSave.setText("Auto save draft logs (to \"../Mage.Client/gamelogs/\" directory)");
|
lblBattlefieldFeedbackColorizingMode.setText("Feedback panel colorizing:");
|
||||||
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() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
cbDraftLogAutoSaveActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
org.jdesktop.layout.GroupLayout main_gamelogLayout = new org.jdesktop.layout.GroupLayout(main_gamelog);
|
org.jdesktop.layout.GroupLayout main_battlefieldLayout = new org.jdesktop.layout.GroupLayout(main_battlefield);
|
||||||
main_gamelog.setLayout(main_gamelogLayout);
|
main_battlefield.setLayout(main_battlefieldLayout);
|
||||||
main_gamelogLayout.setHorizontalGroup(
|
main_battlefieldLayout.setHorizontalGroup(
|
||||||
main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||||
.add(main_gamelogLayout.createSequentialGroup()
|
.add(main_battlefieldLayout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.add(main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
|
.add(lblBattlefieldFeedbackColorizingMode)
|
||||||
.add(cbDraftLogAutoSave, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||||
.add(cbGameLogAutoSave, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 278, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
main_gamelogLayout.setVerticalGroup(
|
main_battlefieldLayout.setVerticalGroup(
|
||||||
main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||||
.add(main_gamelogLayout.createSequentialGroup()
|
.add(main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
|
||||||
.add(cbGameLogAutoSave)
|
.add(lblBattlefieldFeedbackColorizingMode)
|
||||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
.add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
|
||||||
.add(cbDraftLogAutoSave))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
org.jdesktop.layout.GroupLayout tabMainLayout = new org.jdesktop.layout.GroupLayout(tabMain);
|
org.jdesktop.layout.GroupLayout tabMainLayout = new org.jdesktop.layout.GroupLayout(tabMain);
|
||||||
|
@ -813,7 +847,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
.add(tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
.add(tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_card, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_card, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_gamelog, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_gamelog, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.add(main_game, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.add(main_game, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.add(org.jdesktop.layout.GroupLayout.TRAILING, main_battlefield, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
tabMainLayout.setVerticalGroup(
|
tabMainLayout.setVerticalGroup(
|
||||||
|
@ -825,7 +860,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
.add(main_game, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
.add(main_game, 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_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)
|
||||||
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.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)
|
||||||
|
.addContainerGap(154, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
main_card.getAccessibleContext().setAccessibleName("Game panel");
|
main_card.getAccessibleContext().setAccessibleName("Game panel");
|
||||||
|
@ -2712,6 +2749,16 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
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);
|
||||||
|
|
||||||
|
String paramName = KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE;
|
||||||
|
int paramValue = dialog.cbBattlefieldFeedbackColorizingMode.getSelectedIndex();
|
||||||
|
int paramDefault = BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR;
|
||||||
|
if (getCachedValue(paramName, paramDefault) != paramValue) {
|
||||||
|
prefs.putInt(paramName, paramValue);
|
||||||
|
if (UPDATE_CACHE_POLICY) {
|
||||||
|
updateCache(paramName, Integer.toString(paramValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// GUI Size
|
// GUI Size
|
||||||
boolean sizeGUIChanged = false;
|
boolean sizeGUIChanged = false;
|
||||||
if (getCachedValue(KEY_GUI_TABLE_FONT_SIZE, 14) != dialog.sliderFontSize.getValue()) {
|
if (getCachedValue(KEY_GUI_TABLE_FONT_SIZE, 14) != dialog.sliderFontSize.getValue()) {
|
||||||
|
@ -3145,6 +3192,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
private void showFullImagePathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showFullImagePathActionPerformed
|
private void showFullImagePathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showFullImagePathActionPerformed
|
||||||
}//GEN-LAST:event_showFullImagePathActionPerformed
|
}//GEN-LAST:event_showFullImagePathActionPerformed
|
||||||
|
|
||||||
|
private void cbBattlefieldFeedbackColorizingModeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbBattlefieldFeedbackColorizingModeActionPerformed
|
||||||
|
|
||||||
|
}//GEN-LAST:event_cbBattlefieldFeedbackColorizingModeActionPerformed
|
||||||
|
|
||||||
private void showProxySettings() {
|
private void showProxySettings() {
|
||||||
Connection.ProxyType proxyType = (Connection.ProxyType) cbProxyType.getSelectedItem();
|
Connection.ProxyType proxyType = (Connection.ProxyType) cbProxyType.getSelectedItem();
|
||||||
switch (proxyType) {
|
switch (proxyType) {
|
||||||
|
@ -3260,6 +3311,16 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
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");
|
||||||
|
|
||||||
|
String feedbackParam = "";
|
||||||
|
try {
|
||||||
|
feedbackParam = MageFrame.getPreferences().get(KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE, "2");
|
||||||
|
int feedbackMode = Integer.parseInt(feedbackParam);
|
||||||
|
dialog.cbBattlefieldFeedbackColorizingMode.setSelectedIndex(feedbackMode);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.error("Can't parse and setup param " + KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE + " = " + feedbackParam, e);
|
||||||
|
dialog.cbBattlefieldFeedbackColorizingMode.setSelectedIndex(BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR);
|
||||||
|
}
|
||||||
|
|
||||||
load(prefs, dialog.checkBoxUpkeepYou, UPKEEP_YOU, "on", "on");
|
load(prefs, dialog.checkBoxUpkeepYou, UPKEEP_YOU, "on", "on");
|
||||||
load(prefs, dialog.checkBoxDrawYou, DRAW_YOU, "on", "on");
|
load(prefs, dialog.checkBoxDrawYou, DRAW_YOU, "on", "on");
|
||||||
load(prefs, dialog.checkBoxMainYou, MAIN_YOU, "on", "on");
|
load(prefs, dialog.checkBoxMainYou, MAIN_YOU, "on", "on");
|
||||||
|
@ -3759,6 +3820,12 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getBattlefieldFeedbackColorizingMode() {
|
||||||
|
return PreferencesDialog.getCachedValue(
|
||||||
|
PreferencesDialog.KEY_BATTLEFIELD_FEEDBACK_COLORIZING_MODE,
|
||||||
|
BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR);
|
||||||
|
}
|
||||||
|
|
||||||
public List<KeyBindButton> getKeybindButtons() {
|
public List<KeyBindButton> getKeybindButtons() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
keyCancelSkip,
|
keyCancelSkip,
|
||||||
|
@ -3785,6 +3852,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
private javax.swing.JCheckBox cbAllowRequestToShowHandCards;
|
private javax.swing.JCheckBox cbAllowRequestToShowHandCards;
|
||||||
private javax.swing.JCheckBox cbAskMoveToGraveOrder;
|
private javax.swing.JCheckBox cbAskMoveToGraveOrder;
|
||||||
private javax.swing.JCheckBox cbAutoOrderTrigger;
|
private javax.swing.JCheckBox cbAutoOrderTrigger;
|
||||||
|
private javax.swing.JComboBox cbBattlefieldFeedbackColorizingMode;
|
||||||
private javax.swing.JCheckBox cbCardRenderHideSetSymbol;
|
private javax.swing.JCheckBox cbCardRenderHideSetSymbol;
|
||||||
private javax.swing.JCheckBox cbCardRenderImageFallback;
|
private javax.swing.JCheckBox cbCardRenderImageFallback;
|
||||||
private javax.swing.JCheckBox cbCardRenderShowReminderText;
|
private javax.swing.JCheckBox cbCardRenderShowReminderText;
|
||||||
|
@ -3905,6 +3973,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
private javax.swing.JLabel labelToggleRecordMacro;
|
private javax.swing.JLabel labelToggleRecordMacro;
|
||||||
private javax.swing.JLabel labelTooltipSize;
|
private javax.swing.JLabel labelTooltipSize;
|
||||||
private javax.swing.JLabel labelYourTurn;
|
private javax.swing.JLabel labelYourTurn;
|
||||||
|
private javax.swing.JLabel lblBattlefieldFeedbackColorizingMode;
|
||||||
private javax.swing.JLabel lblProxyPassword;
|
private javax.swing.JLabel lblProxyPassword;
|
||||||
private javax.swing.JLabel lblProxyPort;
|
private javax.swing.JLabel lblProxyPort;
|
||||||
private javax.swing.JLabel lblProxyServer;
|
private javax.swing.JLabel lblProxyServer;
|
||||||
|
@ -3912,6 +3981,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
private javax.swing.JLabel lblProxyUserName;
|
private javax.swing.JLabel lblProxyUserName;
|
||||||
private javax.swing.JLabel lblURLServerList;
|
private javax.swing.JLabel lblURLServerList;
|
||||||
private javax.swing.JLabel lebelSkip;
|
private javax.swing.JLabel lebelSkip;
|
||||||
|
private javax.swing.JPanel main_battlefield;
|
||||||
private javax.swing.JPanel main_card;
|
private javax.swing.JPanel main_card;
|
||||||
private javax.swing.JPanel main_game;
|
private javax.swing.JPanel main_game;
|
||||||
private javax.swing.JPanel main_gamelog;
|
private javax.swing.JPanel main_gamelog;
|
||||||
|
|
|
@ -27,12 +27,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.client.game;
|
package mage.client.game;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.*;
|
||||||
import java.awt.Component;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.FlowLayout;
|
|
||||||
import java.awt.GridLayout;
|
|
||||||
import java.awt.Point;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.MouseAdapter;
|
import java.awt.event.MouseAdapter;
|
||||||
|
@ -49,11 +44,13 @@ import javax.swing.ScrollPaneConstants;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.ToolTipManager;
|
import javax.swing.ToolTipManager;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.border.EmptyBorder;
|
||||||
import javax.swing.border.LineBorder;
|
import javax.swing.border.LineBorder;
|
||||||
|
|
||||||
import mage.client.SessionHandler;
|
import mage.client.SessionHandler;
|
||||||
import mage.client.components.MageTextArea;
|
import mage.client.components.MageTextArea;
|
||||||
import mage.client.constants.Constants;
|
import mage.client.constants.Constants;
|
||||||
|
import mage.client.dialog.PreferencesDialog;
|
||||||
import mage.client.game.FeedbackPanel.FeedbackMode;
|
import mage.client.game.FeedbackPanel.FeedbackMode;
|
||||||
|
|
||||||
import static mage.client.game.FeedbackPanel.FeedbackMode.QUESTION;
|
import static mage.client.game.FeedbackPanel.FeedbackMode.QUESTION;
|
||||||
|
@ -81,6 +78,7 @@ public class HelperPanel extends JPanel {
|
||||||
//private javax.swing.JButton btnStopTimer;
|
//private javax.swing.JButton btnStopTimer;
|
||||||
private JScrollPane textAreaScrollPane;
|
private JScrollPane textAreaScrollPane;
|
||||||
private MageTextArea dialogTextArea;
|
private MageTextArea dialogTextArea;
|
||||||
|
JPanel mainPanel;
|
||||||
JPanel buttonGrid;
|
JPanel buttonGrid;
|
||||||
JPanel buttonContainer;
|
JPanel buttonContainer;
|
||||||
|
|
||||||
|
@ -136,13 +134,21 @@ public class HelperPanel extends JPanel {
|
||||||
btnSpecial.setFont(GUISizeHelper.gameDialogAreaFont);
|
btnSpecial.setFont(GUISizeHelper.gameDialogAreaFont);
|
||||||
btnUndo.setFont(GUISizeHelper.gameDialogAreaFont);
|
btnUndo.setFont(GUISizeHelper.gameDialogAreaFont);
|
||||||
|
|
||||||
|
// update text fonts
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
int pos = this.message.indexOf("font-size:");
|
int pos1 = this.message.indexOf("font-size:");
|
||||||
if (pos > 0) {
|
|
||||||
String newMessage = this.message.substring(0, pos + 10) + GUISizeHelper.gameDialogAreaFontSizeBig + this.message.substring(pos + 12);
|
if (pos1 > 0) {
|
||||||
pos = this.message.indexOf("font-size:", pos + 10);
|
int pos2 = this.message.indexOf("font-size:", pos1 + 10);
|
||||||
if (pos > 0) {
|
|
||||||
newMessage = this.message.substring(0, pos + 10) + GUISizeHelper.gameDialogAreaFontSizeSmall + this.message.substring(pos + 12);
|
String newMessage;
|
||||||
|
if (pos2 > 0) {
|
||||||
|
// 2 sizes: big + small // TODO: 2 sizes for compatibility only? On 04.02.2018 can't find two size texts (JayDi85)
|
||||||
|
newMessage = this.message.substring(0, pos1 + 10) + GUISizeHelper.gameDialogAreaFontSizeBig + this.message.substring(pos1 + 12);
|
||||||
|
newMessage = newMessage.substring(0, pos1 + 10) + GUISizeHelper.gameDialogAreaFontSizeSmall + newMessage.substring(pos1 + 12);
|
||||||
|
} else {
|
||||||
|
// 1 size: small
|
||||||
|
newMessage = this.message.substring(0, pos1 + 10) + GUISizeHelper.gameDialogAreaFontSizeSmall + this.message.substring(pos1 + 12);
|
||||||
}
|
}
|
||||||
setBasicMessage(newMessage);
|
setBasicMessage(newMessage);
|
||||||
}
|
}
|
||||||
|
@ -158,9 +164,14 @@ public class HelperPanel extends JPanel {
|
||||||
|
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
initPopupMenuTriggerOrder();
|
initPopupMenuTriggerOrder();
|
||||||
setBackground(new Color(0, 0, 0, 100));
|
|
||||||
setLayout(new GridLayout(0, 1));
|
this.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||||
setOpaque(false);
|
this.setLayout(new GridLayout(0, 1));
|
||||||
|
this.setOpaque(false);
|
||||||
|
mainPanel = new JPanel();
|
||||||
|
mainPanel.setLayout(new GridLayout(0, 1));
|
||||||
|
mainPanel.setOpaque(false);
|
||||||
|
this.add(mainPanel);
|
||||||
|
|
||||||
dialogTextArea = new MageTextArea();
|
dialogTextArea = new MageTextArea();
|
||||||
dialogTextArea.setText("<Empty>");
|
dialogTextArea.setText("<Empty>");
|
||||||
|
@ -172,12 +183,12 @@ public class HelperPanel extends JPanel {
|
||||||
textAreaScrollPane.getViewport().setOpaque(false);
|
textAreaScrollPane.getViewport().setOpaque(false);
|
||||||
textAreaScrollPane.setBorder(null);
|
textAreaScrollPane.setBorder(null);
|
||||||
textAreaScrollPane.setViewportBorder(null);
|
textAreaScrollPane.setViewportBorder(null);
|
||||||
add(textAreaScrollPane);
|
mainPanel.add(textAreaScrollPane);
|
||||||
|
|
||||||
buttonContainer = new JPanel();
|
buttonContainer = new JPanel();
|
||||||
buttonContainer.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
|
buttonContainer.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
|
||||||
buttonContainer.setOpaque(false);
|
buttonContainer.setOpaque(false);
|
||||||
add(buttonContainer);
|
mainPanel.add(buttonContainer);
|
||||||
|
|
||||||
buttonGrid = new JPanel(); // buttons layout auto changes by autoSizeButtonsAndFeedbackState
|
buttonGrid = new JPanel(); // buttons layout auto changes by autoSizeButtonsAndFeedbackState
|
||||||
buttonGrid.setOpaque(false);
|
buttonGrid.setOpaque(false);
|
||||||
|
@ -335,6 +346,7 @@ public class HelperPanel extends JPanel {
|
||||||
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_MAIN = new Color(0, 0, 255, 50);
|
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_MAIN = new Color(0, 0, 255, 50);
|
||||||
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_BATTLE = new Color(255, 0, 0, 50);
|
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_BATTLE = new Color(255, 0, 0, 50);
|
||||||
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER = new Color(0, 255, 0, 50);
|
Color ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER = new Color(0, 255, 0, 50);
|
||||||
|
int FEEDBACK_COLORIZING_MODE = PreferencesDialog.getBattlefieldFeedbackColorizingMode();
|
||||||
|
|
||||||
// cleanup current settings to default (flow layout - different sizes)
|
// cleanup current settings to default (flow layout - different sizes)
|
||||||
this.buttonGrid.setLayout(new FlowLayout(FlowLayout.CENTER, BUTTONS_H_GAP, 0));
|
this.buttonGrid.setLayout(new FlowLayout(FlowLayout.CENTER, BUTTONS_H_GAP, 0));
|
||||||
|
@ -349,23 +361,37 @@ public class HelperPanel extends JPanel {
|
||||||
// color panel on player's feedback waiting
|
// color panel on player's feedback waiting
|
||||||
if (this.gameNeedFeedback) {
|
if (this.gameNeedFeedback) {
|
||||||
// wait player's action
|
// wait player's action
|
||||||
this.setOpaque(true);
|
switch (FEEDBACK_COLORIZING_MODE) {
|
||||||
|
case Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_DISABLE:
|
||||||
|
// disabled
|
||||||
|
this.mainPanel.setOpaque(false);
|
||||||
|
this.mainPanel.setBorder(null);
|
||||||
|
break;
|
||||||
|
|
||||||
// different colors for different game phases
|
case Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_ONE_COLOR:
|
||||||
Color backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER;
|
// one color
|
||||||
if (this.gameTurnPhase != null) {
|
this.mainPanel.setOpaque(true);
|
||||||
switch (this.gameTurnPhase) {
|
this.mainPanel.setBackground(ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER);
|
||||||
case PRECOMBAT_MAIN:
|
break;
|
||||||
case POSTCOMBAT_MAIN:
|
|
||||||
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_MAIN;
|
case Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR:
|
||||||
break;
|
// multicolor
|
||||||
case COMBAT:
|
this.mainPanel.setOpaque(true);
|
||||||
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_BATTLE;
|
Color backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_OTHER;
|
||||||
break;
|
if (this.gameTurnPhase != null) {
|
||||||
}
|
switch (this.gameTurnPhase) {
|
||||||
|
case PRECOMBAT_MAIN:
|
||||||
|
case POSTCOMBAT_MAIN:
|
||||||
|
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_MAIN;
|
||||||
|
break;
|
||||||
|
case COMBAT:
|
||||||
|
backColor = ACTIVE_FEEDBACK_BACKGROUND_COLOR_BATTLE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.mainPanel.setBackground(backColor);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
this.setBackground(backColor);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// inform about other players
|
// inform about other players
|
||||||
this.setOpaque(false);
|
this.setOpaque(false);
|
||||||
|
|
Loading…
Reference in a new issue