diff options
Diffstat (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs')
-rw-r--r-- | Assets/ActionTool/Editor/ActionPreviewEditor.cs | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs index 15bf8d14..a14064f2 100644 --- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs +++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs @@ -103,6 +103,7 @@ namespace ActionTool float y = kToolbarHeight + 5;
GUI_Detail(ref y);
GUI_Curve(ref y);
+ GUI_Setting(ref y);
GUI_TimeLineView(ref y);
}
@@ -219,17 +220,40 @@ namespace ActionTool float xl = 5, xr = xl + 105;
GUI.Label(new Rect(xl, y, 105, 15), "Animation Name:", styles.textMiddle);
- GUI.Label(new Rect(xr, y, 210, 15), ActionManager.CurrentAnimationName, styles.textMiddle);
+ float width = styles.textMiddleBold.CalcSize(new GUIContent(ActionManager.CurrentAnimationName)).x;
+ GUI.Label(new Rect(xr, y, width, 15), ActionManager.CurrentAnimationName, styles.textMiddleBold);
+ if(GUI.Button(new Rect(xr + width + 10, y, 50, 15), "Info"))
+ {
+ ActionInfoEditor.ShowContent("Animation Info",
+ "Length: " + ActionManager.curClip.length + "s \n" +
+ "WrapMode: " + ActionManager.curClip.wrapMode + "\n" +
+ "IsLooping: " + ActionManager.curClip.isLooping + "\n" +
+ "FrameRate: " + ActionManager.curClip.frameRate
+ );
+ }
y += 15;
- GUI.Label(new Rect(xl, y, 105, 15), "ActionData File:", styles.textMiddle);
- GUI.Label(new Rect(xr, y, 510, 15), ActionManager.AnimationDataPath, styles.textMiddle);
+ GUI.Label(new Rect(xl, y, 105, 15), "AnimationData:", styles.textMiddle);
+ width = styles.textMiddleBold.CalcSize(new GUIContent(ActionManager.AnimationDataPath)).x;
+ GUI.Label(new Rect(xr, y, width, 15), ActionManager.AnimationDataPath, styles.textMiddleBold);
+ if (GUI.Button(new Rect(xr + width + 10, y, 50, 15), "Info"))
+ {
+ AnimationData animData = ActionManager.animationData;
+ ActionInfoEditor.ShowContent("AnimationData Info",
+ "Events: " + (animData.animationEvents == null ? 0 : animData.animationEvents.Count )+ "\n" +
+ "HurtBoxes: " + (animData.hurtBoxes == null ? 0 : animData.hurtBoxes.Count) + "\n" +
+ "HitBoxes: " + (animData.hitBoxes == null ? 0 : animData.hitBoxes.Count) + "\n" +
+ "ThrowBoxes: " + (animData.throwBoxes == null ? 0 : animData.throwBoxes.Count) + "\n" +
+ "BlockBoxes: " + (animData.blockBoxes == null ? 0 : animData.blockBoxes.Count) + "\n" +
+ "DefendBoxes: " + (animData.defendBoxes == null ? 0 : animData.defendBoxes.Count) + "\n"
+ );
+ }
y += 15;
GUI.Label(new Rect(xl, y, 105, 15), "Playback Frame:", styles.textMiddle);
- GUI.Label(new Rect(xr, y, 510, 15), ActionManager.actionData.curAnimFrame.ToString("f2"), styles.textMiddle);
+ GUI.Label(new Rect(xr, y, 510, 15), ActionManager.actionData.curAnimFrame.ToString("f2"), styles.textMiddleBold);
GUI.Label(new Rect(xl + 150, y, 105, 15), "Normalized Time:", styles.textMiddle);
- GUI.Label(new Rect(xr + 150, y, 510, 15), ActionManager.actionData.curAnimTimeNormal.ToString("f2"), styles.textMiddle);
+ GUI.Label(new Rect(xr + 150, y, 510, 15), ActionManager.actionData.curAnimTimeNormal.ToString("f2"), styles.textMiddleBold);
y += 15;
}
@@ -248,6 +272,18 @@ namespace ActionTool y += 20;
}
+ void GUI_Setting(ref float y)
+ {
+ ActionData action = ActionManager.actionData;
+
+ float x = 5;
+ action.applyRootMotion = GUI.Toggle(new Rect(x, y, 120, 15), action.applyRootMotion, "Apply RootMotion", styles.toggleSmallBold);
+ x += 130;
+ action.applyCurve = GUI.Toggle(new Rect(x, y, 120, 15), action.applyCurve, "Apply Curve", styles.toggleSmallBold);
+
+ y += 20;
+ }
+
Vector2 scrollPos = Vector2.zero;
void GUI_TimeLineView(ref float iy)
{
|