[unity] Some editor cleanup.

This commit is contained in:
pharan 2018-03-24 06:18:47 +08:00
parent b93686c185
commit f5c2571c44
2 changed files with 7 additions and 6 deletions

View File

@ -370,9 +370,9 @@ namespace Spine.Unity.Editor {
}
EditorGUILayout.LabelField("Name", " Duration");
bool nonessential = targetSkeletonData.ImagesPath != null; // Currently the only way to determine if skeleton data has nonessential data. (Spine 3.6)
float fps = targetSkeletonData.Fps;
if (nonessential && fps == 0) fps = 30;
//bool nonessential = targetSkeletonData.ImagesPath != null; // Currently the only way to determine if skeleton data has nonessential data. (Spine 3.6)
//float fps = targetSkeletonData.Fps;
//if (nonessential && fps == 0) fps = 30;
var activeTrack = preview.ActiveTrack;
foreach (Animation animation in targetSkeletonData.Animations) {
@ -387,8 +387,9 @@ namespace Spine.Unity.Editor {
} else {
GUILayout.Label("-", GUILayout.Width(24));
}
string frameCountString = (fps > 0) ? ("(" + (Mathf.RoundToInt(animation.Duration * fps)) + ")").PadLeft(12, ' ') : string.Empty;
EditorGUILayout.LabelField(new GUIContent(animation.Name, Icons.animation), SpineInspectorUtility.TempContent(animation.Duration.ToString("f3") + "s" + frameCountString));
//string frameCountString = (fps > 0) ? ("(" + (Mathf.RoundToInt(animation.Duration * fps)) + ")").PadLeft(12, ' ') : string.Empty;
//EditorGUILayout.LabelField(new GUIContent(animation.Name, Icons.animation), SpineInspectorUtility.TempContent(animation.Duration.ToString("f3") + "s" + frameCountString));
EditorGUILayout.LabelField(new GUIContent(animation.Name, Icons.animation), SpineInspectorUtility.TempContent(animation.Duration.ToString("f3") + "s"));
}
}
}

View File

@ -374,7 +374,7 @@ namespace Spine.Unity.Editor {
EditorGUI.BeginChangeCheck();
c.Mix = EditorGUILayout.Slider("Mix", c.Mix, MixMin, MixMax);
c.BendDirection = EditorGUILayout.Toggle("Bend Direction +", c.BendDirection > 0) ? 1 : -1;
c.BendDirection = EditorGUILayout.Toggle(SpineInspectorUtility.TempContent("Bend Clockwise", tooltip: "IkConstraint.BendDirection == 1 if clockwise; -1 if counterclockwise."), c.BendDirection > 0) ? 1 : -1;
if (EditorGUI.EndChangeCheck()) requireRepaint = true;
EditorGUILayout.Space();