/**
* Selects a game directory for the profile editor
*/
@FXML private void selectGameDirectory() {
DirectoryChooser chooser = new DirectoryChooser();
if (this.gameDir.getText().isEmpty()) {
chooser.setInitialDirectory(Constants.APPLICATION_WORKING_DIR);
} else {
File gd = new File(this.gameDir.getText());
if (gd.isDirectory()) {
chooser.setInitialDirectory(gd);
} else {
chooser.setInitialDirectory(Constants.APPLICATION_WORKING_DIR);
}
}
File selectedFolder = chooser.showDialog(null);
if (selectedFolder != null) {
this.gameDir.setText(selectedFolder.getAbsolutePath());
}
}
MainFX.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:Krothium-Launcher
作者:
评论列表
文章目录