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 javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.toolbox.FButton;
|
|
||||||
import forge.view.FFrame;
|
import forge.view.FFrame;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,17 +108,12 @@ public class SDisplayUtil {
|
|||||||
dc.setSelected(tab0);
|
dc.setSelected(tab0);
|
||||||
}
|
}
|
||||||
// set focus back to previous owner, if any
|
// set focus back to previous owner, if any
|
||||||
// if (null != c && c instanceof FButton) { //pfps UGLY but maybe necessary (probably not)
|
|
||||||
if (null != c) {
|
if (null != c) {
|
||||||
c.requestFocusInWindow();
|
c.requestFocusInWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if ( FThreads.isGuiThread() ) { //pfps run this now whether in EDT or not so that it doesn't clobber later stuff
|
FThreads.invokeInEdtLater(showTabRoutine);
|
||||||
FThreads.invokeInEdtNowOrLater(showTabRoutine);
|
|
||||||
} else {
|
|
||||||
FThreads.invokeInEdtAndWait(showTabRoutine);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GraphicsDevice getGraphicsDevice(final Point point) {
|
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.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.getCbDetailedPaymentDesc(), FPref.UI_DETAILED_SPELLDESC_IN_PROMPT));
|
||||||
lstControls.add(Pair.of(view.getCbPreselectPrevAbOrder(), FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER));
|
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));
|
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 cbTokensInSeparateRow = new OptionsCheckBox("Display Tokens in a Separate Row");
|
||||||
private final JCheckBox cbStackCreatures = new OptionsCheckBox("Stack Creatures");
|
private final JCheckBox cbStackCreatures = new OptionsCheckBox("Stack Creatures");
|
||||||
private final JCheckBox cbFilterLandsByColorId = new OptionsCheckBox("Filter Lands by Color in Activated Abilities");
|
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<>();
|
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<>();
|
||||||
|
|
||||||
@@ -173,6 +174,9 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
pnlPrefs.add(cbDetailedPaymentDesc, regularConstraints);
|
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(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(cbPreselectPrevAbOrder, regularConstraints);
|
||||||
pnlPrefs.add(new NoteLabel("When enabled, preselects the last defined simultaneous ability order in the ordering dialog."), 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;
|
return cbDetailedPaymentDesc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final JCheckBox getCbShowStormCount() {
|
||||||
|
return cbShowStormCount;
|
||||||
|
}
|
||||||
|
|
||||||
public final JCheckBox getCbPreselectPrevAbOrder() {
|
public final JCheckBox getCbPreselectPrevAbOrder() {
|
||||||
return cbPreselectPrevAbOrder;
|
return cbPreselectPrevAbOrder;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,10 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
|||||||
"Spell Description in Payment Prompt",
|
"Spell Description in Payment Prompt",
|
||||||
"When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."),
|
"When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."),
|
||||||
1);
|
1);
|
||||||
|
lstSettings.addItem(new BooleanSetting(FPref.UI_SHOW_STORM_COUNT_IN_PROMPT,
|
||||||
|
"Show Storm Count in Prompt Panel",
|
||||||
|
"When enabled, displays the current storm count in the prompt panel."),
|
||||||
|
1);
|
||||||
lstSettings.addItem(new BooleanSetting(FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER,
|
lstSettings.addItem(new BooleanSetting(FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER,
|
||||||
"Preselect Last Order of Abilities",
|
"Preselect Last Order of Abilities",
|
||||||
"When enabled, preselects the last defined simultaneous ability order in the ordering dialog."),
|
"When enabled, preselects the last defined simultaneous ability order in the ordering dialog."),
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ import forge.game.player.Player;
|
|||||||
import forge.game.player.PlayerView;
|
import forge.game.player.PlayerView;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.spellability.SpellAbilityView;
|
import forge.game.spellability.SpellAbilityView;
|
||||||
|
import forge.model.FModel;
|
||||||
import forge.player.PlayerControllerHuman;
|
import forge.player.PlayerControllerHuman;
|
||||||
|
import forge.properties.ForgePreferences;
|
||||||
import forge.util.ITriggerEvent;
|
import forge.util.ITriggerEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -135,9 +137,15 @@ public abstract class InputBase implements java.io.Serializable, Input {
|
|||||||
sb.append("Phase: ").append(ph.getPhase().nameForUi).append("\n");
|
sb.append("Phase: ").append(ph.getPhase().nameForUi).append("\n");
|
||||||
sb.append("Stack: ");
|
sb.append("Stack: ");
|
||||||
if (!game.getStack().isEmpty()) {
|
if (!game.getStack().isEmpty()) {
|
||||||
sb.append(game.getStack().size()).append(" to Resolve.");
|
sb.append(game.getStack().size()).append(" to Resolve.\n");
|
||||||
} else {
|
} else {
|
||||||
sb.append("Empty");
|
sb.append("Empty\n");
|
||||||
|
}
|
||||||
|
if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_SHOW_STORM_COUNT_IN_PROMPT)) {
|
||||||
|
int stormCount = game.getView().getStormCount();
|
||||||
|
if (stormCount > 0) {
|
||||||
|
sb.append("Storm Count: ").append(stormCount).append("\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
|||||||
UI_ALLOW_ESC_TO_END_TURN ("false"),
|
UI_ALLOW_ESC_TO_END_TURN ("false"),
|
||||||
UI_PRESELECT_PREVIOUS_ABILITY_ORDER ("false"),
|
UI_PRESELECT_PREVIOUS_ABILITY_ORDER ("false"),
|
||||||
UI_AUTO_YIELD_MODE (ForgeConstants.AUTO_YIELD_PER_ABILITY),
|
UI_AUTO_YIELD_MODE (ForgeConstants.AUTO_YIELD_PER_ABILITY),
|
||||||
|
UI_SHOW_STORM_COUNT_IN_PROMPT ("false"),
|
||||||
|
|
||||||
UI_FOR_TOUCHSCREN("false"),
|
UI_FOR_TOUCHSCREN("false"),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user