mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
GUI: added preferences settings for card icons (enable abilities icons and playable icon);
This commit is contained in:
parent
a1da5ef437
commit
2fe2f05b60
4 changed files with 728 additions and 778 deletions
|
@ -4273,7 +4273,7 @@
|
|||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panelCardImages" max="32767" attributes="0"/>
|
||||
<Component id="jPanel1" max="32767" attributes="0"/>
|
||||
<Component id="panelCardStyles" max="32767" attributes="0"/>
|
||||
<Component id="panelBackgroundImages" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
|
@ -4284,12 +4284,12 @@
|
|||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="panelCardStyles" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="panelCardImages" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="panelBackgroundImages" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="98" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
@ -4448,7 +4448,7 @@
|
|||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Container class="javax.swing.JPanel" name="panelCardStyles">
|
||||
<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">
|
||||
|
@ -4461,67 +4461,41 @@
|
|||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="cbCardRenderImageFallback" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cbCardRenderShowReminderText" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cbCardRenderHideSetSymbol" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cbCardRenderShowAbilityTextOverlay" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="cbCardRenderImageFallback" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbCardRenderShowReminderText" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbCardRenderShowAbilityTextOverlay" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbCardRenderHideSetSymbol" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
|
||||
<Property name="axis" type="int" value="1"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JCheckBox" name="cbCardRenderImageFallback">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Render mode: MTGO style (off) or IMAGE style (on)"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbCardRenderImageFallbackActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbCardRenderIconsForAbilities">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Enable card icons for abilities (example: flying, deathtouch)"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbCardRenderIconsForPlayable">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Enable card icons for playable abilities (example: if you can activate card's ability then show a special icon in the corner)"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator1">
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbCardRenderShowReminderText">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Show reminder text in rendered card textboxes"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbCardRenderShowReminderTextActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbCardRenderHideSetSymbol">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Hide set symbols on cards (more space on the type line for card types)"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbCardRenderHideSetSymbolActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbCardRenderShowAbilityTextOverlay">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Show ability text as overlay in big card view"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbCardRenderShowAbilityTextOverlayActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -138,7 +138,7 @@ public final class GUISizeHelper {
|
|||
|
||||
int otherZonesCardSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_OTHER_ZONES_SIZE, 14);
|
||||
otherZonesCardDimension = new Dimension(CARD_IMAGE_WIDTH * otherZonesCardSize / 42, CARD_IMAGE_HEIGHT * otherZonesCardSize / 42);
|
||||
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_FALLBACK, "false").equals("false")) {
|
||||
if (PreferencesDialog.getRenderMode() == 0) {
|
||||
otherZonesCardVerticalOffset = CardRenderer.getCardTopHeight(otherZonesCardDimension.width);
|
||||
} else if (otherZonesCardSize > 29) {
|
||||
otherZonesCardVerticalOffset = otherZonesCardDimension.height / 8;
|
||||
|
|
|
@ -10,6 +10,7 @@ import mage.cards.MageCardLocation;
|
|||
import mage.cards.MageCardSpace;
|
||||
import mage.client.cards.CardIconsPanel;
|
||||
import mage.client.cards.CardIconsPanelFactory;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.constants.Zone;
|
||||
import mage.util.DebugUtil;
|
||||
import mage.view.CardView;
|
||||
|
@ -146,10 +147,14 @@ public class MageLayer extends MageCard {
|
|||
this.iconsPanels.add(this.iconsDebugPanel);
|
||||
} else {
|
||||
// NORMAL mode -- multiple panels
|
||||
this.iconsAbilitiesPanel = CardIconsPanelFactory.createAbilitiesPanel();
|
||||
this.iconsPanels.add(this.iconsAbilitiesPanel);
|
||||
this.iconsPlayablePanel = CardIconsPanelFactory.createPlayablePanel();
|
||||
this.iconsPanels.add(this.iconsPlayablePanel);
|
||||
if (PreferencesDialog.getRenderIconsForAbilities()) {
|
||||
this.iconsAbilitiesPanel = CardIconsPanelFactory.createAbilitiesPanel();
|
||||
this.iconsPanels.add(this.iconsAbilitiesPanel);
|
||||
}
|
||||
if (PreferencesDialog.getRenderIconsForPlayable()) {
|
||||
this.iconsPlayablePanel = CardIconsPanelFactory.createPlayablePanel();
|
||||
this.iconsPanels.add(this.iconsPlayablePanel);
|
||||
}
|
||||
}
|
||||
|
||||
this.iconsPanels.forEach(panel -> this.mainLayerIcons.add(panel));
|
||||
|
|
Loading…
Reference in a new issue