//TODO: file was choosen;
private void initMenuItems() {
        menuItemFileOpen.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                var fileChooser = new FileChooser();
                var selected = fileChooser.showOpenDialog(null);
                if (selected != null) {
                    //TODO: file was choosen;
                    ifmlEngine.loadStory(selected);
                }
            }
        });
        menuItemFileRestart.setDisable(true);
        menuItemFileRestart.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                //TODO: Ask You are sure ?
                ifmlEngine.restart();
            }
        });
        menuItemFileSave.setDisable(true);
        menuItemFileLoad.setDisable(true);
        menuItemFileExit.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                //TODO: Add question: You are really want to exit.
                Platform.exit();
            }
        });
        menuItemLibraryCatalog.setDisable(true);
        menuItemLibraryImport.setDisable(true);
        menuItemSettingsCheat.setDisable(true);
        menuItemSettingsSettings.setDisable(true);
    }
var selected = fileChooser.showOpenDialog(null);
if (selected != null) {
//TODO: file was choosen;
ifmlEngine.loadStory(selected);
}
private void initMenuItems() {
menuItemFileOpen.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
var fileChooser = new FileChooser();
var selected = fileChooser.showOpenDialog(null);
if (selected != null) {
//TODO: file was choosen;
ifmlEngine.loadStory(selected);
}
}
});
menuItemFileRestart.setDisable(true);
menuItemFileRestart.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
//TODO: Ask You are sure ?
ifmlEngine.restart();
private void initMenuItems() {
menuItemFileOpen.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
var fileChooser = new FileChooser();
var selected = fileChooser.showOpenDialog(null);
if (selected != null) {
//TODO: file was choosen;
ifmlEngine.loadStory(selected);
}
}
});
menuItemFileRestart.setDisable(true);
menuItemFileRestart.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
//TODO: Ask You are sure ?
ifmlEngine.restart();
}
});
menuItemFileSave.setDisable(true);
menuItemFileLoad.setDisable(true);
menuItemFileExit.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
//TODO: Add question: You are really want to exit.
Platform.exit();
}