summaryrefslogtreecommitdiff
path: root/Assets/ActionTool/Editor/ActionPreviewEditor.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-08-09 08:47:48 +0800
committerchai <chaifix@163.com>2021-08-09 08:47:48 +0800
commit7669c3afcbd71f06233bce12bb521c582c07ee5b (patch)
tree92a15b1c214385a53362a7e704fef8e67c7102ad /Assets/ActionTool/Editor/ActionPreviewEditor.cs
parent754ceacd8ab62e7094f1827ae45ea16a502725ad (diff)
*misc
Diffstat (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs')
-rw-r--r--Assets/ActionTool/Editor/ActionPreviewEditor.cs40
1 files changed, 32 insertions, 8 deletions
diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
index 32731deb..9c5fac92 100644
--- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs
+++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
@@ -102,11 +102,13 @@ namespace ActionTool
float y = kToolbarHeight + 5;
GUI_Detail(ref y);
+ GUI_Parameters(ref y);
GUI_Toggle(ref y);
GUI_Curves(ref y);
GUI_Curve(ref y);
+ GUI_PlaybackTime(ref y);
y += 5;
- GUI_Setting(ref y);
+ GUI_Setting(ref y);
GUI_TimeLineView(ref y);
}
@@ -278,16 +280,20 @@ namespace ActionTool
GUI.Label(new Rect(xr, y, 100, 15), "None", styles.textMiddleBold);
}
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.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.textMiddleBold);
- y += 15;
+ void GUI_PlaybackTime(ref float y)
+ {
+ float xl = 5, xr = xl + 105;
+ 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.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.textMiddleBold);
+ y += 15;
+ }
- }
- void GUI_Curve(ref float y)
+ void GUI_Curve(ref float y)
{
AnimationData animData = ActionManager.animationData;
if (animData == null)
@@ -301,6 +307,24 @@ namespace ActionTool
y += 15;
}
+ void GUI_Parameters(ref float y)
+ {
+ AnimationData animData = ActionManager.animationData;
+ if (animData == null)
+ return;
+ var parameters = animData.parameters;
+ float x = 5;
+ GUI.Label(new Rect(x, y, 105, 15), "Parameters:", styles.textMiddle);
+ x += 105;
+ GUI.Label(new Rect(x, y, 10, 15), (parameters != null ? parameters.Count : 0).ToString(), styles.textMiddleBold);
+ x += 20;
+ if (GUI.Button(new Rect(x, y, 50, 15), "Edit"))
+ {
+ EditorWindow.GetWindow<AnimationParameterEditor>(true);
+ }
+ y += 15;
+ }
+
void GUI_Toggle(ref float y)
{
AnimationData animData = ActionManager.animationData;