- Made the max card size customizable (via menu -> Specify Max Card Size).

This commit is contained in:
Sloth
2011-10-03 10:37:24 +00:00
parent c5d29d1972
commit f3e54f754c
5 changed files with 10 additions and 9 deletions

View File

@@ -146,7 +146,7 @@ NewGame/menu/downloadlq=Download Card LQ Pictures
NewGame/menu/downloadsetlq=Download Card Set LQ Pictures NewGame/menu/downloadsetlq=Download Card Set LQ Pictures
NewGame/menu/importPicture=Import Pictures NewGame/menu/importPicture=Import Pictures
NewGame/menu/downloadPrice=Update Price NewGame/menu/downloadPrice=Update Price
NewGame/menu/cardSizes=Specify Card Size NewGame/menu/cardSizes=Specify Max Card Size
NewGame/menu/cardStack=Specify Max Stack Size NewGame/menu/cardStack=Specify Max Stack Size
NewGame/menu/cardStackOffset=Specify Stack Offset NewGame/menu/cardStackOffset=Specify Stack Offset
NewGame/menu/about=About NewGame/menu/about=About

View File

@@ -3,6 +3,7 @@ package arcane.ui;
import arcane.ui.util.CardPanelMouseListener; import arcane.ui.util.CardPanelMouseListener;
import arcane.ui.util.UI; import arcane.ui.util.UI;
import forge.Card; import forge.Card;
import forge.Constant;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@@ -27,7 +28,7 @@ abstract public class CardPanelContainer extends JPanel {
public List<CardPanel> cardPanels = new ArrayList<CardPanel>(); public List<CardPanel> cardPanels = new ArrayList<CardPanel>();
protected JScrollPane scrollPane; protected JScrollPane scrollPane;
protected int cardWidthMin = 50, cardWidthMax = 300; protected int cardWidthMin = 50, cardWidthMax = Constant.Runtime.width[0];
protected CardPanel mouseOverPanel, mouseDownPanel, mouseDragPanel; protected CardPanel mouseOverPanel, mouseDownPanel, mouseDragPanel;
private List<CardPanelMouseListener> listeners = new ArrayList<CardPanelMouseListener>(2); private List<CardPanelMouseListener> listeners = new ArrayList<CardPanelMouseListener>(2);

View File

@@ -33,7 +33,7 @@ public interface Constant {
public static final boolean[] RndCFoil = new boolean[1]; public static final boolean[] RndCFoil = new boolean[1];
public static final int[] width = new int[1]; public static final int[] width = {300};
public static final int[] height = new int[1]; public static final int[] height = new int[1];
public static final int[] stackSize = new int[1]; public static final int[] stackSize = new int[1];

View File

@@ -1521,11 +1521,11 @@ public class Gui_HomeScreen {
} }
private void doCardSize() { private void doCardSize() {
String[] keys = {"Tiny", "Smaller", "Small", "Medium", "Large", "Huge"}; String[] keys = {"Tiny", "Smaller", "Small", "Medium", "Large(default)", "Huge"};
int[] widths = {36, 42, 63, 70, 93, 120}; int[] widths = {52, 80, 120, 200, 300, 400};
int[] heights = {50, 59, 88, 98, 130, 168}; int[] heights = {50, 59, 88, 98, 130, 168};
ListChooser<String> ch = new ListChooser<String>("Choose one", "Choose a new card size", 0, 1, keys); ListChooser<String> ch = new ListChooser<String>("Choose one", "Choose a new max card size", 0, 1, keys);
if (ch.show()) { if (ch.show()) {
try { try {
int index = ch.getSelectedIndex(); int index = ch.getSelectedIndex();

View File

@@ -134,7 +134,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
AllZone.setQuestData(null); AllZone.setQuestData(null);
if (Constant.Runtime.width[0] == 0) { if (Constant.Runtime.width[0] == 0) {
Constant.Runtime.width[0] = 70; Constant.Runtime.width[0] = 300;
} }
if (Constant.Runtime.height[0] == 0) { if (Constant.Runtime.height[0] == 0) {
@@ -1151,7 +1151,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
private static final long serialVersionUID = -2900235618450319571L; private static final long serialVersionUID = -2900235618450319571L;
private static String[] keys = {"Tiny", "Smaller", "Small", "Medium", "Large", "Huge"}; private static String[] keys = {"Tiny", "Smaller", "Small", "Medium", "Large", "Huge"};
private static int[] widths = {36, 42, 63, 70, 93, 120}; private static int[] widths = {52, 80, 120, 200, 300, 400};
private static int[] heights = {50, 59, 88, 98, 130, 168}; private static int[] heights = {50, 59, 88, 98, 130, 168};
/** /**
@@ -1165,7 +1165,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
* *
*/ */
public final void actionPerformed(final ActionEvent e) { public final void actionPerformed(final ActionEvent e) {
ListChooser<String> ch = new ListChooser<String>("Choose one", "Choose a new card size", 0, 1, keys); ListChooser<String> ch = new ListChooser<String>("Choose one", "Choose a new max card size", 0, 1, keys);
if (ch.show()) { if (ch.show()) {
try { try {
int index = ch.getSelectedIndex(); int index = ch.getSelectedIndex();