Skip to content

Commit

Permalink
Added exit function to file > close
Browse files Browse the repository at this point in the history
  • Loading branch information
Supernova1114 committed Jul 27, 2021
1 parent bb9b1a5 commit 44c780a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/sample/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ void initialize(){
logFolderLink.setText("");
}

@FXML
public void closeApp(){
Main.primaryStage.close();
System.exit(0);
}

@FXML
public void openLogFolder() throws IOException {
logFolderLink.setVisited(false);
Expand Down
2 changes: 1 addition & 1 deletion src/sample/sample.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#openFile" text="Open" />
<MenuItem mnemonicParsing="false" text="Close" />
<MenuItem mnemonicParsing="false" onAction="#closeApp" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
Expand Down

0 comments on commit 44c780a

Please # to comment.