[libgdx] Skeleton Viewer, accept drag and drop with any data file suffix.

This commit is contained in:
Nathan Sweet 2022-01-27 13:40:18 -04:00
parent e4a92c8463
commit b677e2ece1

View File

@ -380,9 +380,10 @@ public class SkeletonViewer extends ApplicationAdapter {
@Override @Override
public void filesDropped (String[] files) { public void filesDropped (String[] files) {
for (String file : files) { for (String file : files) {
if (file.endsWith(".json") || file.endsWith(".skel")) { for (String endSuffix : endSuffixes) {
skeletonViewer.loadSkeleton(Gdx.files.absolute(file)); for (String dataSuffix : dataSuffixes) {
return; if (file.endsWith(dataSuffix + endSuffix) && skeletonViewer.loadSkeleton(Gdx.files.absolute(file))) return;
}
} }
} }
} }