MCPcopy Create free account
hub / github.com/Card-Forge/forge / exit

Method exit

forge-gui-mobile/src/forge/Forge.java:678–700  ·  view source on GitHub ↗
(boolean silent)

Source from the content-addressed store, hash-verified

676 }
677
678 public static void exit(boolean silent) {
679 if (exited) {
680 return;
681 } //don't allow exiting multiple times
682
683 final List<String> options = new ArrayList<>();
684 options.add(getLocalizer().getMessage("lblExit"));
685 options.add(getLocalizer().getMessage("lblCancel"));
686
687 Consumer<Integer> callback = result -> {
688 if (result == 0) {
689 exited = true;
690 exitAnimation(false);
691 }
692 };
693
694 if (silent) {
695 callback.accept(0);
696 } else {
697 FOptionPane.showOptionDialog(getLocalizer().getMessage("lblAreYouSureYouWishExitForge"), "",
698 FOptionPane.QUESTION_ICON, options, 0, callback);
699 }
700 }
701
702 public static void openScreen(final FScreen screen0) {
703 openScreen(screen0, false);

Callers 5

backMethod · 0.95
ExitMethod · 0.95
keyDownMethod · 0.95
BugReportDialogMethod · 0.95
closeRequestedMethod · 0.95

Calls 6

getLocalizerMethod · 0.95
exitAnimationMethod · 0.95
showOptionDialogMethod · 0.95
addMethod · 0.65
getMessageMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected