mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -40,6 +40,7 @@ import javax.swing.WindowConstants;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import forge.GuiBase;
|
||||
import forge.ImageCache;
|
||||
import forge.LobbyPlayer;
|
||||
import forge.Singletons;
|
||||
@@ -219,6 +220,10 @@ public enum FControl implements KeyEventDispatcher {
|
||||
|
||||
final ForgePreferences prefs = FModel.getPreferences();
|
||||
|
||||
//set ElsaSerializer from preference
|
||||
boolean propertyConfig = prefs != null && prefs.getPrefBoolean(ForgePreferences.FPref.UI_USE_ELSA);
|
||||
GuiBase.enablePropertyConfig(propertyConfig);
|
||||
|
||||
closeAction = CloseAction.valueOf(prefs.getPref(FPref.UI_CLOSE_ACTION));
|
||||
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
|
||||
@@ -115,6 +115,7 @@ public enum CSubmenuPreferences implements ICDoc {
|
||||
lstControls.add(Pair.of(view.getCbSingletons(), FPref.DECKGEN_SINGLETONS));
|
||||
lstControls.add(Pair.of(view.getCbEnableAICheats(), FPref.UI_ENABLE_AI_CHEATS));
|
||||
lstControls.add(Pair.of(view.getCbEnableUnknownCards(), FPref.UI_LOAD_UNKNOWN_CARDS));
|
||||
lstControls.add(Pair.of(view.getCbUseElsa(), FPref.UI_USE_ELSA));
|
||||
lstControls.add(Pair.of(view.getCbImageFetcher(), FPref.UI_ENABLE_ONLINE_IMAGE_FETCHER));
|
||||
lstControls.add(Pair.of(view.getCbDisplayFoil(), FPref.UI_OVERLAY_FOIL_EFFECT));
|
||||
lstControls.add(Pair.of(view.getCbRandomFoil(), FPref.UI_RANDOM_FOIL));
|
||||
|
||||
@@ -108,6 +108,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
private final JCheckBox cbRemindOnPriority = new OptionsCheckBox(localizer.getMessage("cbRemindOnPriority"));
|
||||
private final JCheckBox cbUseSentry = new OptionsCheckBox(localizer.getMessage("cbUseSentry"));
|
||||
private final JCheckBox cbEnableUnknownCards = new OptionsCheckBox(localizer.getMessage("lblEnableUnknownCards"));
|
||||
private final JCheckBox cbUseElsa = new OptionsCheckBox("Use ELSA Serializer");
|
||||
|
||||
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<>();
|
||||
|
||||
@@ -291,6 +292,9 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
pnlPrefs.add(cbEnableUnknownCards, titleConstraints);
|
||||
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEnableUnknownCards")), descriptionConstraints);
|
||||
|
||||
/*pnlPrefs.add(cbUseElsa, titleConstraints);
|
||||
pnlPrefs.add(new NoteLabel("Use ELSA Serializer for Network (EXPERIMENTAL Option, Requires restart)"), descriptionConstraints);*/
|
||||
|
||||
// Graphic Options
|
||||
pnlPrefs.add(new SectionLabel(localizer.getMessage("GraphicOptions")), sectionConstraints + ", gaptop 2%");
|
||||
|
||||
@@ -589,6 +593,11 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
return cbEnableUnknownCards;
|
||||
}
|
||||
|
||||
/** @return {@link javax.swing.JCheckBox} */
|
||||
public JCheckBox getCbUseElsa() {
|
||||
return cbUseElsa;
|
||||
}
|
||||
|
||||
/** @return {@link javax.swing.JCheckBox} */
|
||||
public JCheckBox getCbImageFetcher() {
|
||||
return cbImageFetcher;
|
||||
|
||||
@@ -49,9 +49,6 @@ public final class Main {
|
||||
//setup GUI interface
|
||||
GuiBase.setInterface(new GuiDesktop());
|
||||
|
||||
//set PropertyConfig log4j to true
|
||||
GuiBase.enablePropertyConfig(true);
|
||||
|
||||
//install our error handler
|
||||
ExceptionHandler.registerErrorHandling();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user