mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Add preference to Hide Reminder Text
This commit is contained in:
@@ -82,6 +82,7 @@ public enum CSubmenuPreferences implements ICDoc {
|
|||||||
lstControls.add(Pair.of(view.getCbCompactMainMenu(), FPref.UI_COMPACT_MAIN_MENU));
|
lstControls.add(Pair.of(view.getCbCompactMainMenu(), FPref.UI_COMPACT_MAIN_MENU));
|
||||||
lstControls.add(Pair.of(view.getCbUseThemes(), FPref.UI_THEMED_COMBOBOX));
|
lstControls.add(Pair.of(view.getCbUseThemes(), FPref.UI_THEMED_COMBOBOX));
|
||||||
lstControls.add(Pair.of(view.getCbPromptFreeBlocks(), FPref.MATCHPREF_PROMPT_FREE_BLOCKS));
|
lstControls.add(Pair.of(view.getCbPromptFreeBlocks(), FPref.MATCHPREF_PROMPT_FREE_BLOCKS));
|
||||||
|
lstControls.add(Pair.of(view.getCbHideReminderText(), FPref.UI_HIDE_REMINDER_TEXT));
|
||||||
|
|
||||||
for(final Pair<JCheckBox, FPref> kv : lstControls) {
|
for(final Pair<JCheckBox, FPref> kv : lstControls) {
|
||||||
kv.getKey().addItemListener(new ItemListener() {
|
kv.getKey().addItemListener(new ItemListener() {
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
private final JCheckBox cbCompactMainMenu = new OptionsCheckBox("Use Compact Main Sidebar Menu");
|
private final JCheckBox cbCompactMainMenu = new OptionsCheckBox("Use Compact Main Sidebar Menu");
|
||||||
private final JCheckBox cbUseThemes = new OptionsCheckBox("Enable Themes");
|
private final JCheckBox cbUseThemes = new OptionsCheckBox("Enable Themes");
|
||||||
private final JCheckBox cbPromptFreeBlocks = new OptionsCheckBox("Free Block Handling");
|
private final JCheckBox cbPromptFreeBlocks = new OptionsCheckBox("Free Block Handling");
|
||||||
|
private final JCheckBox cbHideReminderText = new OptionsCheckBox("Hide Reminder Text");
|
||||||
|
|
||||||
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<FPref, KeyboardShortcutField>();
|
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<FPref, KeyboardShortcutField>();
|
||||||
|
|
||||||
@@ -175,7 +176,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
|
|
||||||
pnlPrefs.add(cbUseThemes, regularConstraints);
|
pnlPrefs.add(cbUseThemes, regularConstraints);
|
||||||
pnlPrefs.add(new NoteLabel("Currently only applies to UIManager-related theme settings. (RESTART REQUIRED)"), regularConstraints);
|
pnlPrefs.add(new NoteLabel("Currently only applies to UIManager-related theme settings. (RESTART REQUIRED)"), regularConstraints);
|
||||||
|
|
||||||
pnlPrefs.add(cbpCloseAction, "w 80%!, gap 10% 0 0 10px, span 2 1");
|
pnlPrefs.add(cbpCloseAction, "w 80%!, gap 10% 0 0 10px, span 2 1");
|
||||||
pnlPrefs.add(new NoteLabel("Changes what happens when clicking the X button in the upper right."), regularConstraints);
|
pnlPrefs.add(new NoteLabel("Changes what happens when clicking the X button in the upper right."), regularConstraints);
|
||||||
|
|
||||||
@@ -186,7 +187,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
pnlPrefs.add(new NoteLabel("Adds foiled effects to random cards."), regularConstraints);
|
pnlPrefs.add(new NoteLabel("Adds foiled effects to random cards."), regularConstraints);
|
||||||
|
|
||||||
pnlPrefs.add(cbRandomizeArt, regularConstraints);
|
pnlPrefs.add(cbRandomizeArt, regularConstraints);
|
||||||
pnlPrefs.add(new NoteLabel("Randomize the card art for cards in the human's deck"), regularConstraints);
|
pnlPrefs.add(new NoteLabel("Randomize the card art for cards in the human's deck."), regularConstraints);
|
||||||
|
|
||||||
pnlPrefs.add(cbScaleLarger, regularConstraints);
|
pnlPrefs.add(cbScaleLarger, regularConstraints);
|
||||||
pnlPrefs.add(new NoteLabel("Allows card pictures to be expanded larger than their original size."), regularConstraints);
|
pnlPrefs.add(new NoteLabel("Allows card pictures to be expanded larger than their original size."), regularConstraints);
|
||||||
@@ -194,6 +195,9 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
pnlPrefs.add(cbUiForTouchScreen, regularConstraints);
|
pnlPrefs.add(cbUiForTouchScreen, regularConstraints);
|
||||||
pnlPrefs.add(new NoteLabel("Increases some UI elements to provide a better experience on touchscreen devices. (Needs restart)"), regularConstraints);
|
pnlPrefs.add(new NoteLabel("Increases some UI elements to provide a better experience on touchscreen devices. (Needs restart)"), regularConstraints);
|
||||||
|
|
||||||
|
pnlPrefs.add(cbHideReminderText, regularConstraints);
|
||||||
|
pnlPrefs.add(new NoteLabel("Hide reminder text in Card Detail pane."), regularConstraints);
|
||||||
|
|
||||||
// Sound options
|
// Sound options
|
||||||
pnlPrefs.add(new SectionLabel("Sound Options"), sectionConstraints + ", gaptop 2%");
|
pnlPrefs.add(new SectionLabel("Sound Options"), sectionConstraints + ", gaptop 2%");
|
||||||
|
|
||||||
@@ -450,7 +454,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
public FComboBoxPanel<GameLogEntryType> getGameLogVerbosityComboBoxPanel() {
|
public FComboBoxPanel<GameLogEntryType> getGameLogVerbosityComboBoxPanel() {
|
||||||
return cbpGameLogEntryType;
|
return cbpGameLogEntryType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FComboBoxPanel<CloseAction> getCloseActionComboBoxPanel() {
|
public FComboBoxPanel<CloseAction> getCloseActionComboBoxPanel() {
|
||||||
return cbpCloseAction;
|
return cbpCloseAction;
|
||||||
}
|
}
|
||||||
@@ -484,6 +488,10 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
return cbUiForTouchScreen;
|
return cbUiForTouchScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final JCheckBox getCbHideReminderText() {
|
||||||
|
return cbHideReminderText;
|
||||||
|
}
|
||||||
|
|
||||||
/** @return {@link forge.gui.toolbox.FLabel} */
|
/** @return {@link forge.gui.toolbox.FLabel} */
|
||||||
public FLabel getBtnReset() {
|
public FLabel getBtnReset() {
|
||||||
return btnReset;
|
return btnReset;
|
||||||
@@ -507,7 +515,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
|||||||
public final FLabel getBtnDeleteEditorUI() {
|
public final FLabel getBtnDeleteEditorUI() {
|
||||||
return btnDeleteEditorUI;
|
return btnDeleteEditorUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final FLabel getBtnDeleteWorkshopUI() {
|
public final FLabel getBtnDeleteWorkshopUI() {
|
||||||
return btnDeleteWorkshopUI;
|
return btnDeleteWorkshopUI;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1654,9 +1654,10 @@ public enum FSkin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String encodeSymbols(String str) {
|
public static String encodeSymbols(String str) {
|
||||||
//format reminder text in italics
|
//format reminder text in italics (or hide if preference set)
|
||||||
String pattern = "\\((.+)\\)";
|
String pattern = "\\((.+)\\)";
|
||||||
String replacement = "<i>\\($1\\)</i>"; //TODO: Consider setting to hide reminder text, in which case replace with "" here
|
String replacement = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_HIDE_REMINDER_TEXT) ?
|
||||||
|
"" : "<i>\\($1\\)</i>";
|
||||||
str = str.replaceAll(pattern, replacement);
|
str = str.replaceAll(pattern, replacement);
|
||||||
|
|
||||||
//format mana symbols to display as icons
|
//format mana symbols to display as icons
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
|||||||
UI_OVERLAY_CARD_POWER ("true"),
|
UI_OVERLAY_CARD_POWER ("true"),
|
||||||
UI_OVERLAY_CARD_MANA_COST ("true"),
|
UI_OVERLAY_CARD_MANA_COST ("true"),
|
||||||
UI_OVERLAY_CARD_ID ("true"),
|
UI_OVERLAY_CARD_ID ("true"),
|
||||||
|
UI_HIDE_REMINDER_TEXT ("false"),
|
||||||
UI_UPLOAD_DRAFT ("false"),
|
UI_UPLOAD_DRAFT ("false"),
|
||||||
UI_SCALE_LARGER ("true"),
|
UI_SCALE_LARGER ("true"),
|
||||||
UI_MAX_STACK ("3"),
|
UI_MAX_STACK ("3"),
|
||||||
|
|||||||
Reference in New Issue
Block a user