[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
public void filesDropped (String[] files) {
for (String file : files) {
if (file.endsWith(".json") || file.endsWith(".skel")) {
skeletonViewer.loadSkeleton(Gdx.files.absolute(file));
return;
for (String endSuffix : endSuffixes) {
for (String dataSuffix : dataSuffixes) {
if (file.endsWith(dataSuffix + endSuffix) && skeletonViewer.loadSkeleton(Gdx.files.absolute(file))) return;
}
}
}
}