Merge pull request #6549 from kevlahnota/master2

fix SealedScreen
This commit is contained in:
kevlahnota
2024-11-09 08:24:52 +08:00
committed by GitHub
2 changed files with 10 additions and 8 deletions

View File

@@ -285,18 +285,21 @@ public class FDeckEditor extends TabPageScreen<FDeckEditor> {
private final FLabel btnMoreOptions = deckHeader.add(new FLabel.Builder().text("...").font(FSkinFont.get(20)).align(Align.center).pressedColor(Header.getBtnPressedColor()).build()); private final FLabel btnMoreOptions = deckHeader.add(new FLabel.Builder().text("...").font(FSkinFont.get(20)).align(Align.center).pressedColor(Header.getBtnPressedColor()).build());
public FDeckEditor(EditorType editorType0, DeckProxy editDeck, boolean showMainDeck) { public FDeckEditor(EditorType editorType0, DeckProxy editDeck, boolean showMainDeck) {
this(editorType0, editDeck.getName(), editDeck.getPath(), null, showMainDeck,null); this(editorType0, editDeck.getName(), editDeck.getPath(), null, showMainDeck, null);
} }
public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck,FEventHandler backButton) { public FDeckEditor(EditorType editorType0, DeckProxy editDeck, boolean showMainDeck, FEventHandler backButton) {
this(editorType0, editDeckName, "", null, showMainDeck,backButton); this(editorType0, editDeck.getName(), editDeck.getPath(), null, showMainDeck, backButton);
}
public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck, FEventHandler backButton) {
this(editorType0, editDeckName, "", null, showMainDeck, backButton);
} }
public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck) { public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck) {
this(editorType0, editDeckName, "", null, showMainDeck,null); this(editorType0, editDeckName, "", null, showMainDeck, null);
} }
public FDeckEditor(EditorType editorType0, Deck newDeck, boolean showMainDeck) { public FDeckEditor(EditorType editorType0, Deck newDeck, boolean showMainDeck) {
this(editorType0, "", "", newDeck, showMainDeck,null); this(editorType0, "", "", newDeck, showMainDeck, null);
} }
private FDeckEditor(EditorType editorType0, String editDeckName, String editDeckPath, Deck newDeck, boolean showMainDeck,FEventHandler backButton) { private FDeckEditor(EditorType editorType0, String editDeckName, String editDeckPath, Deck newDeck, boolean showMainDeck, FEventHandler backButton) {
super(backButton, getPages(editorType0)); super(backButton, getPages(editorType0));
editorType = editorType0; editorType = editorType0;

View File

@@ -48,8 +48,7 @@ public class NewSealedScreen extends LaunchScreen {
FThreads.invokeInEdtLater(() -> { FThreads.invokeInEdtLater(() -> {
DeckPreferences.setSealedDeck(sealed.getName()); DeckPreferences.setSealedDeck(sealed.getName());
Forge.openScreen(new FDeckEditor(EditorType.Sealed, sealed.getName(), false)); Forge.openScreen(new FDeckEditor(EditorType.Sealed, sealed.getName(), false, e -> Forge.openScreen(new LoadSealedScreen(), false)));
Forge.setBackScreen(new LoadSealedScreen(), false); //ensure pressing back goes to load sealed screen
}); });
}); });
} }