mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-12 01:58:45 +08:00
[unity] Some editor cleanup.
This commit is contained in:
parent
b93686c185
commit
f5c2571c44
@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user