List of usage examples for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor setComparator
public FileProcessor setComparator(Comparator<File> comparator)
From source file:com.kotcrab.vis.editor.util.gdx.VisTexturePacker.java
License:Apache License
static public void process(TexturePacker.Settings settings, String input, String output, String packFileName, FilenameFilter filter) {//from w w w . j a va 2 s. c o m try { TexturePackerFileProcessor processor = new TexturePackerFileProcessor(settings, packFileName); processor.setInputFilter(filter); // Sort input files by name to avoid platform-dependent atlas output changes. processor.setComparator((file1, file2) -> file1.getName().compareTo(file2.getName())); processor.process(new File(input), new File(output)); } catch (Exception ex) { throw new RuntimeException("Error packing images.", ex); } }