use of com.kotcrab.vis.ui.widget.file.FileChooserListener in project bladecoder-adventure-engine by bladecoder.
the class ProjectToolbar method loadProject.
private void loadProject() {
fileChooser.setSelectionMode(SelectionMode.DIRECTORIES);
getStage().addActor(fileChooser);
fileChooser.setListener(new FileChooserListener() {
@Override
public void selected(Array<FileHandle> files) {
final File f = files.get(0).file();
try {
EditorUtils.checkVersionAndLoadProject(f, getStage(), skin);
} catch (Exception e) {
EditorLogger.error("Error loading last project.", e);
Ctx.project.closeProject();
}
}
@Override
public void canceled() {
}
});
}
Aggregations