mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Updates to UI to separate out format filters
This commit is contained in:
@@ -92,6 +92,17 @@ public class CardManager extends ItemManager<PaperCard> {
|
||||
}
|
||||
menu.add(fmt);
|
||||
|
||||
JMenu fmthist = GuiUtils.createMenu("Historic Format");
|
||||
for (final GameFormat f : FModel.getFormats().getHistoricList()) {
|
||||
GuiUtils.addMenuItem(fmthist, f.getName(), null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
itemManager.addFilter(new CardFormatFilter(itemManager, f));
|
||||
}
|
||||
}, FormatFilter.canAddFormat(f, itemManager.getFilter(CardFormatFilter.class)));
|
||||
}
|
||||
menu.add(fmthist);
|
||||
|
||||
GuiUtils.addMenuItem(menu, "Sets...", null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -186,6 +186,17 @@ public final class DeckManager extends ItemManager<DeckProxy> implements IHasGam
|
||||
}
|
||||
menu.add(fmt);
|
||||
|
||||
final JMenu fmtall = GuiUtils.createMenu("Historic Format");
|
||||
for (final GameFormat f : FModel.getFormats().getHistoricList()) {
|
||||
GuiUtils.addMenuItem(fmtall, f.getName(), null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
addFilter(new DeckFormatFilter(DeckManager.this, f));
|
||||
}
|
||||
}, FormatFilter.canAddFormat(f, getFilter(DeckFormatFilter.class)));
|
||||
}
|
||||
menu.add(fmtall);
|
||||
|
||||
GuiUtils.addMenuItem(menu, "Sets...", null, new Runnable() {
|
||||
@Override public void run() {
|
||||
final DeckSetFilter existingFilter = getFilter(DeckSetFilter.class);
|
||||
|
||||
Reference in New Issue
Block a user