mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added a way to show the current storm count in the prompt pane (in desktop Forge) or prompt panel (in mobile Forge), it is optional and disabled by default (probably only useful for decks that rely on Storm and might clutter the prompt panel a bit in mobile Forge and thus make the text smaller). Can be enabled in Forge preferences via the "Show Storm Count in Prompt Pane/Panel" option.
This commit is contained in:
@@ -18,7 +18,6 @@ import javax.swing.JPanel;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import forge.FThreads;
|
||||
import forge.toolbox.FButton;
|
||||
import forge.view.FFrame;
|
||||
|
||||
/**
|
||||
@@ -109,17 +108,12 @@ public class SDisplayUtil {
|
||||
dc.setSelected(tab0);
|
||||
}
|
||||
// set focus back to previous owner, if any
|
||||
// if (null != c && c instanceof FButton) { //pfps UGLY but maybe necessary (probably not)
|
||||
if (null != c) {
|
||||
c.requestFocusInWindow();
|
||||
}
|
||||
}
|
||||
};
|
||||
if ( FThreads.isGuiThread() ) { //pfps run this now whether in EDT or not so that it doesn't clobber later stuff
|
||||
FThreads.invokeInEdtNowOrLater(showTabRoutine);
|
||||
} else {
|
||||
FThreads.invokeInEdtAndWait(showTabRoutine);
|
||||
}
|
||||
FThreads.invokeInEdtLater(showTabRoutine);
|
||||
}
|
||||
|
||||
public static GraphicsDevice getGraphicsDevice(final Point point) {
|
||||
|
||||
@@ -118,6 +118,7 @@ public enum CSubmenuPreferences implements ICDoc {
|
||||
lstControls.add(Pair.of(view.getCbEscapeEndsTurn(), FPref.UI_ALLOW_ESC_TO_END_TURN));
|
||||
lstControls.add(Pair.of(view.getCbDetailedPaymentDesc(), FPref.UI_DETAILED_SPELLDESC_IN_PROMPT));
|
||||
lstControls.add(Pair.of(view.getCbPreselectPrevAbOrder(), FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER));
|
||||
lstControls.add(Pair.of(view.getCbShowStormCount(), FPref.UI_SHOW_STORM_COUNT_IN_PROMPT));
|
||||
|
||||
lstControls.add(Pair.of(view.getCbFilterLandsByColorId(), FPref.UI_FILTER_LANDS_BY_COLOR_IDENTITY));
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
private final JCheckBox cbTokensInSeparateRow = new OptionsCheckBox("Display Tokens in a Separate Row");
|
||||
private final JCheckBox cbStackCreatures = new OptionsCheckBox("Stack Creatures");
|
||||
private final JCheckBox cbFilterLandsByColorId = new OptionsCheckBox("Filter Lands by Color in Activated Abilities");
|
||||
private final JCheckBox cbShowStormCount = new OptionsCheckBox("Show Storm Count in Prompt Pane");
|
||||
|
||||
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<>();
|
||||
|
||||
@@ -173,6 +174,9 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
pnlPrefs.add(cbDetailedPaymentDesc, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."), regularConstraints);
|
||||
|
||||
pnlPrefs.add(cbShowStormCount, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("When enabled, displays the current storm count in the prompt pane."), regularConstraints);
|
||||
|
||||
pnlPrefs.add(cbPreselectPrevAbOrder, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("When enabled, preselects the last defined simultaneous ability order in the ordering dialog."), regularConstraints);
|
||||
|
||||
@@ -635,6 +639,10 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
return cbDetailedPaymentDesc;
|
||||
}
|
||||
|
||||
public final JCheckBox getCbShowStormCount() {
|
||||
return cbShowStormCount;
|
||||
}
|
||||
|
||||
public final JCheckBox getCbPreselectPrevAbOrder() {
|
||||
return cbPreselectPrevAbOrder;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user