mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Remove unused format filter visibility controls
This commit is contained in:
@@ -317,7 +317,6 @@ public class AdventureDeckEditor extends FDeckEditor {
|
|||||||
protected void initialize() {
|
protected void initialize() {
|
||||||
super.initialize();
|
super.initialize();
|
||||||
cardManager.setBtnAdvancedSearchOptions(true);
|
cardManager.setBtnAdvancedSearchOptions(true);
|
||||||
cardManager.setCatalogDisplay(true);
|
|
||||||
scheduleRefresh();
|
scheduleRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +434,6 @@ public class AdventureDeckEditor extends FDeckEditor {
|
|||||||
protected void initialize() {
|
protected void initialize() {
|
||||||
super.initialize();
|
super.initialize();
|
||||||
cardManager.setBtnAdvancedSearchOptions(true);
|
cardManager.setBtnAdvancedSearchOptions(true);
|
||||||
cardManager.setCatalogDisplay(true);
|
|
||||||
cardManager.setPool(getCardPool(), false); //Need to update this early for the caption.
|
cardManager.setPool(getCardPool(), false); //Need to update this early for the caption.
|
||||||
this.updateCaption();
|
this.updateCaption();
|
||||||
}
|
}
|
||||||
@@ -945,7 +943,6 @@ public class AdventureDeckEditor extends FDeckEditor {
|
|||||||
protected AdventureDeckSectionPage(DeckSection deckSection, ItemManagerConfig config) {
|
protected AdventureDeckSectionPage(DeckSection deckSection, ItemManagerConfig config) {
|
||||||
super(new AdventureCardManager(), deckSection, config, deckSection.getLocalizedShortName(), iconFromDeckSection(deckSection));
|
super(new AdventureCardManager(), deckSection, config, deckSection.getLocalizedShortName(), iconFromDeckSection(deckSection));
|
||||||
cardManager.setBtnAdvancedSearchOptions(deckSection == DeckSection.Main);
|
cardManager.setBtnAdvancedSearchOptions(deckSection == DeckSection.Main);
|
||||||
cardManager.setCatalogDisplay(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
private boolean viewUpdating, needSecondUpdate;
|
private boolean viewUpdating, needSecondUpdate;
|
||||||
private Supplier<List<ItemColumn>> sortCols = Suppliers.memoize(ArrayList::new);
|
private Supplier<List<ItemColumn>> sortCols = Suppliers.memoize(ArrayList::new);
|
||||||
private final TextSearchFilter<? extends T> searchFilter;
|
private final TextSearchFilter<? extends T> searchFilter;
|
||||||
private CardFormatFilter cardFormatFilter;
|
|
||||||
|
|
||||||
private final FLabel btnSearch = new FLabel.ButtonBuilder()
|
private final FLabel btnSearch = new FLabel.ButtonBuilder()
|
||||||
.icon(Forge.hdbuttons ? FSkinImage.HDSEARCH : FSkinImage.SEARCH).iconScaleFactor(0.9f).selectable().build();
|
.icon(Forge.hdbuttons ? FSkinImage.HDSEARCH : FSkinImage.SEARCH).iconScaleFactor(0.9f).selectable().build();
|
||||||
@@ -638,25 +637,6 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
btnAdvancedSearchOptions.setEnabled(enable);
|
btnAdvancedSearchOptions.setEnabled(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCatalogDisplay(boolean enable) {
|
|
||||||
if (cardFormatFilter == null)
|
|
||||||
return;
|
|
||||||
if (cardFormatFilter.getMainComponent() instanceof FComboBox<?>) {
|
|
||||||
if (!enable)
|
|
||||||
((FComboBox<?>) cardFormatFilter.getMainComponent()).setSelectedIndex(0);
|
|
||||||
cardFormatFilter.getMainComponent().setEnabled(enable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCatalogSelectedIndex() {
|
|
||||||
if (cardFormatFilter == null)
|
|
||||||
return 0;
|
|
||||||
if (cardFormatFilter.getMainComponent() instanceof FComboBox<?>) {
|
|
||||||
return((FComboBox<?>) cardFormatFilter.getMainComponent()).getSelectedIndex();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void scrollSelectionIntoView() {
|
public void scrollSelectionIntoView() {
|
||||||
currentView.scrollSelectionIntoView();
|
currentView.scrollSelectionIntoView();
|
||||||
}
|
}
|
||||||
@@ -678,8 +658,6 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
public void addFilter(final ItemFilter<? extends T> filter) {
|
public void addFilter(final ItemFilter<? extends T> filter) {
|
||||||
filters.get().add(filter);
|
filters.get().add(filter);
|
||||||
add(filter.getWidget());
|
add(filter.getWidget());
|
||||||
if (filter instanceof CardFormatFilter)
|
|
||||||
cardFormatFilter = (CardFormatFilter) filter;
|
|
||||||
|
|
||||||
boolean visible = !hideFilters;
|
boolean visible = !hideFilters;
|
||||||
filter.getWidget().setVisible(visible);
|
filter.getWidget().setVisible(visible);
|
||||||
|
|||||||
Reference in New Issue
Block a user