mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Don't fail to run if prefs were corrupt.
This commit is contained in:
parent
5e829cb006
commit
eb84807152
@ -904,6 +904,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
||||
}
|
||||
|
||||
void loadPrefs () {
|
||||
try {
|
||||
debugBonesCheckbox.setChecked(prefs.getBoolean("debugBones", true));
|
||||
debugRegionsCheckbox.setChecked(prefs.getBoolean("debugRegions", false));
|
||||
debugMeshHullCheckbox.setChecked(prefs.getBoolean("debugMeshHull", false));
|
||||
@ -924,6 +925,10 @@ public class SkeletonViewer extends ApplicationAdapter {
|
||||
scaleSlider.setValue(prefs.getFloat("scale", 1));
|
||||
animationList.setSelected(prefs.getString("animationName", null));
|
||||
skinList.setSelected(prefs.getString("skinName", null));
|
||||
} catch (Exception ex) {
|
||||
System.out.println("Unable to read preferences:");
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user