mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
* preferences fixes
This commit is contained in:
@@ -143,7 +143,7 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
|
||||
millLoseCheckBox.setSelected(preferences.millingLossCondition);
|
||||
cardOverlay.setSelected(preferences.cardOverlay);
|
||||
CardStackOffsetAction.set(preferences.stackOffset);
|
||||
CardStackAction.set(preferences.maxStackSize);
|
||||
CardStackAction.setVal(preferences.maxStackSize);
|
||||
CardSizesAction.set(preferences.cardSize);
|
||||
} catch (Exception e) {
|
||||
Log.error("Error loading preferences");
|
||||
@@ -820,8 +820,7 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
|
||||
if(ch.show()) try {
|
||||
int index = ch.getSelectedIndex();
|
||||
if(index == -1) return;
|
||||
Constant.Runtime.width[0] = widths[index];
|
||||
Constant.Runtime.height[0] = heights[index];
|
||||
set(index);
|
||||
} catch(Exception ex) {
|
||||
ErrorViewer.showError(ex);
|
||||
}
|
||||
@@ -872,6 +871,11 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
|
||||
preferences.maxStackSize = values[index];
|
||||
Constant.Runtime.stackSize[0] = values[index];
|
||||
}
|
||||
|
||||
public static void setVal(int val) {
|
||||
preferences.maxStackSize = val;
|
||||
Constant.Runtime.stackSize[0] = val;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CardStackOffsetAction extends AbstractAction {
|
||||
|
||||
Reference in New Issue
Block a user