Example usage for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor setInputFilter

List of usage examples for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor setInputFilter

Introduction

In this page you can find the example usage for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor setInputFilter.

Prototype

public FileProcessor setInputFilter(FilenameFilter inputFilter) 

Source Link

Usage

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) {/*www .ja  va  2  s. co 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);
    }
}