mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Maximize space for viewing pack cards by eliminating Choose Card button and hiding view options by default
This commit is contained in:
@@ -69,7 +69,10 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
|
||||
final CardManager catalogManager = new CardManager(false);
|
||||
final CardManager deckManager = new CardManager(false);
|
||||
|
||||
catalogManager.setHideFilters(true); //hide filters so more of pack is visible by default
|
||||
//hide filters and options panel so more of pack is visible by default
|
||||
catalogManager.setHideFilters(true);
|
||||
catalogManager.setHideViewOptions(1, true);
|
||||
|
||||
deckManager.setCaption("Draft Picks");
|
||||
|
||||
catalogManager.setAlwaysNonUnique(true);
|
||||
@@ -264,7 +267,6 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
|
||||
this.getDeckManager().setup(SColumnUtil.getDeckDefaultColumns(), GroupDef.CREATURE_SPELL_LAND, ColumnDef.CMC, 1);
|
||||
|
||||
ccAddLabel = this.getBtnAdd().getText();
|
||||
this.getBtnAdd().setText("Choose Card");
|
||||
|
||||
if (this.getDeckManager().getPool() == null) { //avoid showing next choice or resetting pool if just switching back to Draft screen
|
||||
this.showChoices(this.boosterDraft.nextChoice());
|
||||
@@ -275,6 +277,7 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
|
||||
}
|
||||
|
||||
//Remove buttons
|
||||
this.getBtnAdd().setVisible(false);
|
||||
this.getBtnAdd4().setVisible(false);
|
||||
this.getBtnRemove().setVisible(false);
|
||||
this.getBtnRemove4().setVisible(false);
|
||||
|
||||
@@ -321,9 +321,9 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel {
|
||||
this.setViewIndex(viewIndex);
|
||||
}
|
||||
|
||||
public void setViewIndex(int index) {
|
||||
if (index < 0 || index >= this.views.size()) { return; }
|
||||
ItemView<T> view = this.views.get(index);
|
||||
public void setViewIndex(int viewIndex) {
|
||||
if (viewIndex < 0 || viewIndex >= this.views.size()) { return; }
|
||||
ItemView<T> view = this.views.get(viewIndex);
|
||||
if (this.currentView == view) { return; }
|
||||
|
||||
final int backupIndexToSelect = this.currentView.getSelectedIndex();
|
||||
@@ -352,6 +352,11 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel {
|
||||
this.focus();
|
||||
}
|
||||
|
||||
public void setHideViewOptions(int viewIndex, boolean hideViewOptions) {
|
||||
if (viewIndex < 0 || viewIndex >= this.views.size()) { return; }
|
||||
this.views.get(viewIndex).getPnlOptions().setVisible(!hideViewOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doLayout() {
|
||||
int buttonPanelHeight = 32;
|
||||
|
||||
Reference in New Issue
Block a user