mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Convert hide prompt header setting into compact prompt setting that also controls font size
This commit is contained in:
@@ -82,8 +82,8 @@ public enum CSubmenuPreferences implements ICDoc {
|
||||
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.getCbPromptFreeBlocks(), FPref.MATCHPREF_PROMPT_FREE_BLOCKS));
|
||||
lstControls.add(Pair.of(view.getCbCompactPrompt(), FPref.UI_COMPACT_PROMPT));
|
||||
lstControls.add(Pair.of(view.getCbStackCardView(), FPref.UI_STACK_CARD_VIEW));
|
||||
lstControls.add(Pair.of(view.getCbHidePromptHeader(), FPref.UI_HIDE_PROMPT_HEADER));
|
||||
lstControls.add(Pair.of(view.getCbHideReminderText(), FPref.UI_HIDE_REMINDER_TEXT));
|
||||
|
||||
for(final Pair<JCheckBox, FPref> kv : lstControls) {
|
||||
|
||||
@@ -84,8 +84,8 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
private final JCheckBox cbCompactMainMenu = new OptionsCheckBox("Use Compact Main Sidebar Menu");
|
||||
private final JCheckBox cbUseThemes = new OptionsCheckBox("Enable Themes");
|
||||
private final JCheckBox cbPromptFreeBlocks = new OptionsCheckBox("Free Block Handling");
|
||||
private final JCheckBox cbCompactPrompt = new OptionsCheckBox("Compact Prompt");
|
||||
private final JCheckBox cbStackCardView = new OptionsCheckBox("Card View for Stack");
|
||||
private final JCheckBox cbHidePromptHeader = new OptionsCheckBox("Hide Prompt Header");
|
||||
private final JCheckBox cbHideReminderText = new OptionsCheckBox("Hide Reminder Text");
|
||||
|
||||
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<FPref, KeyboardShortcutField>();
|
||||
@@ -197,12 +197,12 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
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(cbCompactPrompt, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("Hide header and use smaller font in Prompt pane to make it more compact."), regularConstraints);
|
||||
|
||||
pnlPrefs.add(cbStackCardView, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("Show cards and abilities on Stack in card view rather than list view."), regularConstraints);
|
||||
|
||||
pnlPrefs.add(cbHidePromptHeader, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("Hide header in Prompt pane that shows the current game and turn."), regularConstraints);
|
||||
|
||||
pnlPrefs.add(cbHideReminderText, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("Hide reminder text in Card Detail pane."), regularConstraints);
|
||||
|
||||
@@ -496,12 +496,12 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
return cbUiForTouchScreen;
|
||||
}
|
||||
|
||||
public final JCheckBox getCbStackCardView() {
|
||||
return cbStackCardView;
|
||||
public final JCheckBox getCbCompactPrompt() {
|
||||
return cbCompactPrompt;
|
||||
}
|
||||
|
||||
public final JCheckBox getCbHidePromptHeader() {
|
||||
return cbHidePromptHeader;
|
||||
public final JCheckBox getCbStackCardView() {
|
||||
return cbStackCardView;
|
||||
}
|
||||
|
||||
public final JCheckBox getCbHideReminderText() {
|
||||
|
||||
@@ -25,8 +25,6 @@ import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.ScrollPaneConstants;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.text.DefaultCaret;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import forge.Singletons;
|
||||
import forge.gui.framework.DragCell;
|
||||
@@ -39,7 +37,6 @@ import forge.gui.toolbox.FHtmlViewer;
|
||||
import forge.gui.toolbox.FLabel;
|
||||
import forge.gui.toolbox.FScrollPanel;
|
||||
import forge.gui.toolbox.FSkin;
|
||||
import forge.gui.toolbox.FSkin.JTextComponentSkin;
|
||||
import forge.properties.ForgePreferences;
|
||||
import forge.properties.ForgePreferences.FPref;
|
||||
|
||||
@@ -73,14 +70,8 @@ public enum VMessage implements IVDoc<CMessage> {
|
||||
.opaque()
|
||||
.build();
|
||||
|
||||
JTextComponentSkin<FHtmlViewer> tarMessageSkin = FSkin.get(tarMessage);
|
||||
tarMessageSkin.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
||||
tarMessageSkin.setFont(FSkin.getFont(12));
|
||||
FSkin.get(tarMessage).setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
|
||||
tarMessage.setMargin(new Insets(3, 3, 3, 3));
|
||||
|
||||
// Prevent scroll-bar from automatically scrolling to bottom of JTextArea.
|
||||
DefaultCaret caret = (DefaultCaret)tarMessage.getCaret();
|
||||
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
|
||||
}
|
||||
|
||||
//========== Overridden methods
|
||||
@@ -95,8 +86,12 @@ public enum VMessage implements IVDoc<CMessage> {
|
||||
|
||||
// wrap : 2 columns required for btnOk and btnCancel.
|
||||
container.setLayout(new MigLayout("wrap 2, gap 0px!, insets 1px 1px 3px 1px"));
|
||||
if (!prefs.getPrefBoolean(FPref.UI_HIDE_PROMPT_HEADER)) {
|
||||
if (prefs.getPrefBoolean(FPref.UI_COMPACT_PROMPT)) { //hide header and use smaller font if compact prompt
|
||||
FSkin.get(tarMessage).setFont(FSkin.getFont(12));
|
||||
}
|
||||
else {
|
||||
container.add(lblGames, "span 2, w 10:100%, h 22px!");
|
||||
FSkin.get(tarMessage).setFont(FSkin.getFont(14));
|
||||
}
|
||||
lblGames.setText("Game Setup");
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
||||
UI_OVERLAY_CARD_MANA_COST ("true"),
|
||||
UI_OVERLAY_CARD_ID ("true"),
|
||||
UI_HIDE_REMINDER_TEXT ("false"),
|
||||
UI_HIDE_PROMPT_HEADER ("false"),
|
||||
UI_UPLOAD_DRAFT ("false"),
|
||||
UI_SCALE_LARGER ("true"),
|
||||
UI_COMPACT_PROMPT ("false"),
|
||||
UI_MAX_STACK ("3"),
|
||||
UI_STACK_OFFSET ("tiny"),
|
||||
UI_STACK_CARD_VIEW ("false"),
|
||||
|
||||
Reference in New Issue
Block a user