mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Fixed "scale larger" setting to work on-the-fly (no reset required).
This commit is contained in:
@@ -9,6 +9,7 @@ import javax.swing.event.ListSelectionListener;
|
|||||||
|
|
||||||
import forge.AllZone;
|
import forge.AllZone;
|
||||||
import forge.Constant;
|
import forge.Constant;
|
||||||
|
import forge.ImageCache;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.properties.ForgePreferences;
|
import forge.properties.ForgePreferences;
|
||||||
import forge.properties.ForgePreferences.CardSizeType;
|
import forge.properties.ForgePreferences.CardSizeType;
|
||||||
@@ -56,7 +57,7 @@ public class ControlSettings {
|
|||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent arg0) {
|
public void actionPerformed(final ActionEvent arg0) {
|
||||||
final boolean toggle = ControlSettings.this.view.getCbAnte().isSelected();
|
final boolean toggle = ControlSettings.this.view.getCbAnte().isSelected();
|
||||||
Singletons.getModel().getPreferences().setPlayForAnte(toggle);
|
prefs.setPlayForAnte(toggle);
|
||||||
try { prefs.save(); } catch (Exception e) { e.printStackTrace(); }
|
try { prefs.save(); } catch (Exception e) { e.printStackTrace(); }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -66,6 +67,7 @@ public class ControlSettings {
|
|||||||
public void actionPerformed(final ActionEvent arg0) {
|
public void actionPerformed(final ActionEvent arg0) {
|
||||||
final boolean toggle = ControlSettings.this.view.getCbScaleLarger().isSelected();
|
final boolean toggle = ControlSettings.this.view.getCbScaleLarger().isSelected();
|
||||||
prefs.setScaleLargerThanOriginal(toggle);
|
prefs.setScaleLargerThanOriginal(toggle);
|
||||||
|
ImageCache.setScaleLargerThanOriginal(toggle);
|
||||||
try { prefs.save(); } catch (Exception e) { e.printStackTrace(); }
|
try { prefs.save(); } catch (Exception e) { e.printStackTrace(); }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -154,22 +156,12 @@ public class ControlSettings {
|
|||||||
prefs.setSkin(name);
|
prefs.setSkin(name);
|
||||||
AllZone.setSkin(skin);
|
AllZone.setSkin(skin);
|
||||||
((GuiTopLevel) AllZone.getDisplay()).getController().changeState(0);
|
((GuiTopLevel) AllZone.getDisplay()).getController().changeState(0);
|
||||||
// This should work, but it doesn't. :| Doublestrike 15-12-11
|
// TODO This should work, but it doesn't. :| Doublestrike 15-12-11
|
||||||
view.getParentView().showSettingsMenu();
|
view.getParentView().showSettingsMenu();
|
||||||
|
|
||||||
prefs.save();
|
prefs.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param rad0   JRadioButton
|
|
||||||
* @throws Exception */
|
|
||||||
/*
|
|
||||||
public void updateStackOffset(JRadioButton rad0) throws Exception {
|
|
||||||
StackOffsetType sot = StackOffsetType.valueOf(rad0.getText().toLowerCase());
|
|
||||||
Singletons.getModel().getPreferences().setStackOffset(sot);
|
|
||||||
prefs.save();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @param rad0   JRadioButton
|
/** @param rad0   JRadioButton
|
||||||
* @throws Exception */
|
* @throws Exception */
|
||||||
public void updateCardSize(JRadioButton rad0) throws Exception {
|
public void updateCardSize(JRadioButton rad0) throws Exception {
|
||||||
@@ -177,13 +169,4 @@ public class ControlSettings {
|
|||||||
Singletons.getModel().getPreferences().setCardSize(cst);
|
Singletons.getModel().getPreferences().setCardSize(cst);
|
||||||
prefs.save();
|
prefs.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param rad0   JRadioButton
|
|
||||||
* @throws Exception */
|
|
||||||
/*
|
|
||||||
public void updateStackSize(JRadioButton rad0) throws Exception {
|
|
||||||
Singletons.getModel().getPreferences().setMaxStackSize(Integer.parseInt(rad0.getText()));
|
|
||||||
prefs.save();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user