mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +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
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user