mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Prompt before leaving draft
This commit is contained in:
@@ -279,6 +279,12 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean canSwitchAway(boolean isClosing) {
|
public boolean canSwitchAway(boolean isClosing) {
|
||||||
|
if (isClosing) {
|
||||||
|
String userPrompt =
|
||||||
|
"This will end the current draft and you will not be able to resume.\n\n" +
|
||||||
|
"Leave anyway?";
|
||||||
|
return FOptionPane.showConfirmDialog(userPrompt, "Leave Draft?", "Leave", "Cancel", false);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user