mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added an option to display color identity of cards in the card detail panel (details in CHANGES.txt).
This commit is contained in:
@@ -172,6 +172,7 @@ public enum CSubmenuPreferences implements ICDoc {
|
||||
initializeGameLogVerbosityComboBox();
|
||||
initializeCloseActionComboBox();
|
||||
initializeAiProfilesComboBox();
|
||||
initializeColorIdentityCombobox();
|
||||
initializePlayerNameButton();
|
||||
}
|
||||
|
||||
@@ -298,6 +299,15 @@ public enum CSubmenuPreferences implements ICDoc {
|
||||
panel.setComboBox(comboBox, selectedItem);
|
||||
}
|
||||
|
||||
private void initializeColorIdentityCombobox() {
|
||||
final String[] elems = {"Never", "Only Multicolor", "Always"};
|
||||
final FPref userSetting = FPref.UI_DISPLAY_COLOR_IDENTITY;
|
||||
final FComboBoxPanel<String> panel = this.view.getDisplayColorIdentity();
|
||||
final FComboBox<String> comboBox = createComboBox(elems, userSetting);
|
||||
final String selectedItem = this.prefs.getPref(userSetting);
|
||||
panel.setComboBox(comboBox, selectedItem);
|
||||
}
|
||||
|
||||
private <E> FComboBox<E> createComboBox(final E[] items, final ForgePreferences.FPref setting) {
|
||||
final FComboBox<E> comboBox = new FComboBox<>(items);
|
||||
addComboBoxListener(comboBox, setting);
|
||||
|
||||
@@ -89,6 +89,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
private final FComboBoxPanel<GameLogEntryType> cbpGameLogEntryType = new FComboBoxPanel<>("Game Log Verbosity:");
|
||||
private final FComboBoxPanel<CloseAction> cbpCloseAction = new FComboBoxPanel<>("Close Action:");
|
||||
private final FComboBoxPanel<String> cbpAiProfiles = new FComboBoxPanel<>("AI Personality:");
|
||||
private final FComboBoxPanel<String> cbpDisplayColorIdentity = new FComboBoxPanel<>("Display Color Identity:");
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -224,6 +225,9 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
pnlPrefs.add(cbStackCreatures, regularConstraints);
|
||||
pnlPrefs.add(new NoteLabel("Stacks identical creatures on the battlefield like lands, artifacts, and enchantments."), regularConstraints);
|
||||
|
||||
pnlPrefs.add(cbpDisplayColorIdentity, "w 80%!, gap 10% 0 0 10px, span 2 1");
|
||||
pnlPrefs.add(new NoteLabel("Displays the color identity of cards in the card detail information panel."), regularConstraints);
|
||||
|
||||
// Sound options
|
||||
pnlPrefs.add(new SectionLabel("Sound Options"), sectionConstraints + ", gaptop 2%");
|
||||
|
||||
@@ -494,6 +498,10 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
|
||||
return cbpGameLogEntryType;
|
||||
}
|
||||
|
||||
public FComboBoxPanel<String> getDisplayColorIdentity() {
|
||||
return cbpDisplayColorIdentity;
|
||||
}
|
||||
|
||||
public FComboBoxPanel<CloseAction> getCloseActionComboBoxPanel() {
|
||||
return cbpCloseAction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user