mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Made the max card size customizable (via menu -> Specify Max Card Size).
This commit is contained in:
@@ -3,6 +3,7 @@ package arcane.ui;
|
||||
import arcane.ui.util.CardPanelMouseListener;
|
||||
import arcane.ui.util.UI;
|
||||
import forge.Card;
|
||||
import forge.Constant;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -27,7 +28,7 @@ abstract public class CardPanelContainer extends JPanel {
|
||||
|
||||
public List<CardPanel> cardPanels = new ArrayList<CardPanel>();
|
||||
protected JScrollPane scrollPane;
|
||||
protected int cardWidthMin = 50, cardWidthMax = 300;
|
||||
protected int cardWidthMin = 50, cardWidthMax = Constant.Runtime.width[0];
|
||||
protected CardPanel mouseOverPanel, mouseDownPanel, mouseDragPanel;
|
||||
|
||||
private List<CardPanelMouseListener> listeners = new ArrayList<CardPanelMouseListener>(2);
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface Constant {
|
||||
|
||||
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[] stackSize = new int[1];
|
||||
|
||||
@@ -1521,11 +1521,11 @@ public class Gui_HomeScreen {
|
||||
}
|
||||
|
||||
private void doCardSize() {
|
||||
String[] keys = {"Tiny", "Smaller", "Small", "Medium", "Large", "Huge"};
|
||||
int[] widths = {36, 42, 63, 70, 93, 120};
|
||||
String[] keys = {"Tiny", "Smaller", "Small", "Medium", "Large(default)", "Huge"};
|
||||
int[] widths = {52, 80, 120, 200, 300, 400};
|
||||
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()) {
|
||||
try {
|
||||
int index = ch.getSelectedIndex();
|
||||
|
||||
@@ -134,7 +134,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
AllZone.setQuestData(null);
|
||||
|
||||
if (Constant.Runtime.width[0] == 0) {
|
||||
Constant.Runtime.width[0] = 70;
|
||||
Constant.Runtime.width[0] = 300;
|
||||
}
|
||||
|
||||
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 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};
|
||||
|
||||
/**
|
||||
@@ -1165,7 +1165,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
*
|
||||
*/
|
||||
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()) {
|
||||
try {
|
||||
int index = ch.getSelectedIndex();
|
||||
|
||||
Reference in New Issue
Block a user