private void setupDraft() { // Determine what kind of booster draft to run final LimitedPoolType poolType = GuiChoose.oneOrNone("Choose Draft Format", LimitedPoolType.values()); if (poolType == null) { return; } final WinstonDraft draft = WinstonDraft.createDraft(poolType); if (draft == null) { return; } final CEditorWinstonProcess draftController = new CEditorWinstonProcess(CDeckEditorUI.SINGLETON_INSTANCE.getCDetailPicture()); draftController.showGui(draft); Singletons.getControl().setCurrentScreen(FScreen.DRAFTING_PROCESS); CDeckEditorUI.SINGLETON_INSTANCE.setEditorController(draftController); }
public boolean canExitForge(final boolean forRestart) { final String action = (forRestart ? "Restart" : "Exit"); String userPrompt = "Are you sure you wish to " + (forRestart ? "restart" : "exit") + " Forge?"; final boolean hasCurrentMatches = hasCurrentMatches(); if (hasCurrentMatches) { userPrompt = "One or more games are currently active. " + userPrompt; } if (!FOptionPane.showConfirmDialog( userPrompt, action + " Forge", action, "Cancel", !hasCurrentMatches)) { // default Yes if no game active return false; } if (!CDeckEditorUI.SINGLETON_INSTANCE.canSwitchAway(true)) { return false; } return true; }