Mass driver power fix / Bugfixes
This commit is contained in:
@@ -29,12 +29,21 @@ public class FileChooser extends FloatingDialog{
|
||||
private Predicate<FileHandle> filter;
|
||||
private Consumer<FileHandle> selectListener;
|
||||
private boolean open;
|
||||
private int lastWidth = Core.graphics.getWidth(), lastHeight = Core.graphics.getHeight();
|
||||
|
||||
public FileChooser(String title, Predicate<FileHandle> filter, boolean open, Consumer<FileHandle> result){
|
||||
super(title);
|
||||
this.open = open;
|
||||
this.filter = filter;
|
||||
this.selectListener = result;
|
||||
|
||||
update(() -> {
|
||||
if(Core.graphics.getWidth() != lastWidth || Core.graphics.getHeight() != lastHeight){
|
||||
updateFiles(false);
|
||||
lastHeight = Core.graphics.getHeight();
|
||||
lastWidth = Core.graphics.getWidth();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setupWidgets(){
|
||||
@@ -268,14 +277,6 @@ public class FileChooser extends FloatingDialog{
|
||||
return this;
|
||||
}
|
||||
|
||||
public void fileSelected(Consumer<FileHandle> listener){
|
||||
this.selectListener = listener;
|
||||
}
|
||||
|
||||
public interface FileHandleFilter{
|
||||
boolean accept(FileHandle file);
|
||||
}
|
||||
|
||||
public class FileHistory{
|
||||
private Array<FileHandle> history = new Array<>();
|
||||
private int index;
|
||||
|
||||
Reference in New Issue
Block a user