mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-10 04:36:57 +08:00
[libgdx] Skeleton Viewer, accept drag and drop with any data file suffix.
This commit is contained in:
parent
e4a92c8463
commit
b677e2ece1
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user