use of com.kotcrab.vis.ui.widget.file.SingleFileChooserListener in project Mundus by jpooleycodes.
the class FileChooserField method setupListeners.
private void setupListeners() {
fcBtn.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
super.clicked(event, x, y);
FileChooser fileChooser = UI.INSTANCE.getFileChooser();
fileChooser.setSelectionMode(mode);
fileChooser.setListener(new SingleFileChooserListener() {
@Override
protected void selected(FileHandle file) {
fileHandle = file;
path = file.path();
textField.setText(file.path());
if (fileSelected != null) {
fileSelected.selected(file);
}
}
});
UI.INSTANCE.addActor(fileChooser.fadeIn());
}
});
}
Aggregations