summaryrefslogtreecommitdiff
path: root/Erika/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Erika/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs')
-rw-r--r--Erika/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs41
1 files changed, 25 insertions, 16 deletions
diff --git a/Erika/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs b/Erika/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs
index d6ad15d8..a9c1e2ae 100644
--- a/Erika/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs
+++ b/Erika/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs
@@ -19,7 +19,7 @@ namespace ActionTool
public int frame;
}
- public class ActionPreviewEditor : EditorWindow
+ public partial class ActionPreviewEditor : EditorWindow
{
Texture m_UITextureStop;
Texture m_UITexturePause;
@@ -77,6 +77,8 @@ namespace ActionTool
m_UITextureNewDefendBox = (Texture)Resources.Load("defendbox");
m_IsLeftOrRightButtonClicked = false;
+
+ SceneView.onSceneGUIDelegate += OnSceneGUI;
}
void Update()
@@ -89,6 +91,7 @@ namespace ActionTool
private void OnDisable()
{
+ SceneView.onSceneGUIDelegate -= OnSceneGUI;
ActionManager.PreviewWindow = null;
}
@@ -115,9 +118,13 @@ namespace ActionTool
float y = kToolbarHeight + 5;
GUI_Detail(ref y);
+ y += 5;
+ GUI_GrayBg(ref y, 2);
+ y += 5;
GUI_ActionSettings(ref y);
GUI_Properties(ref y);
- GUI_TimeRelatedBg(ref y, 4);
+ y += 5;
+ GUI_GrayBg(ref y, 4);
y += 5;
GUI_Parameters(ref y);
GUI_Toggle(ref y);
@@ -125,7 +132,7 @@ namespace ActionTool
GUI_Curve(ref y);
y += 12;
GUI_Setting(ref y);
- y += 5;
+ y += 10;
GUI_PlaybackTime(ref y);
GUI_TimeLineView(ref y);
}
@@ -362,14 +369,16 @@ namespace ActionTool
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, 110, 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, 110, 15), ActionManager.actionData.curAnimTimeNormal.ToString("f2"), styles.textMiddleBold);
- GUI.Label(new Rect(xl + 150 * 2, y, 105, 15), "Event Frame:", styles.textMiddle);
- GUI.Label(new Rect(xr + 150 + 125, y, 110, 15), ((int)ActionManager.actionData.curAnimFrame).ToString(), styles.textMiddleBold);
- GUI.Label(new Rect(xl + 150 + 130 + 130, y, 105, 15), "Time:", styles.textMiddle);
- GUI.Label(new Rect(xr + 150 + 130 + 65 , y, 510, 15), (ActionManager.actionData.curAnimTimeNormal * ActionManager.curClip.length).ToString(), styles.textMiddleBold);
+ float padding = 170;
+ float width = 150;
+ GUI.Label(new Rect(xl, y, width, 15), "Playback Frame: " + ActionManager.actionData.curAnimFrame.ToString("f2"), styles.textMiddle);
+ //GUI.Label(new Rect(xr, y, 110, 15), ActionManager.actionData.curAnimFrame.ToString("f2"), styles.textMiddleBold);
+ GUI.Label(new Rect(xl + padding, y, width, 15), "Normalized Time: " + ActionManager.actionData.curAnimTimeNormal.ToString("f2"), styles.textMiddle);
+ //GUI.Label(new Rect(xr + padding, y, 110, 15), ActionManager.actionData.curAnimTimeNormal.ToString("f2"), styles.textMiddleBold);
+ GUI.Label(new Rect(xl + padding * 2, y, width, 15), "Event Frame: " + ((int)ActionManager.actionData.curAnimFrame).ToString(), styles.textMiddle);
+ //GUI.Label(new Rect(xr + padding * 2, y, 110, 15), ((int)ActionManager.actionData.curAnimFrame).ToString(), styles.textMiddleBold);
+ GUI.Label(new Rect(xl + padding * 3, y, width, 15), "Time: " + (ActionManager.actionData.curAnimTimeNormal * ActionManager.curClip.length).ToString(), styles.textMiddle);
+ //GUI.Label(new Rect(xr + padding * 3, y, 510, 15), (ActionManager.actionData.curAnimTimeNormal * ActionManager.curClip.length).ToString(), styles.textMiddleBold);
y += 15;
}
@@ -405,7 +414,7 @@ namespace ActionTool
y += 15;
}
- void GUI_TimeRelatedBg(ref float y, int lineCount)
+ void GUI_GrayBg(ref float y, int lineCount)
{
Rect bgRect = new Rect(3, y + 3, position.width - 6, 15 * lineCount + 6);
EditorGUI.DrawRect(bgRect, new Color32(65, 65, 65, 255));
@@ -810,7 +819,7 @@ namespace ActionTool
Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize);
if (GUI.Button(rect, new GUIContent(" + ", m_UITextureNewThrowBox, "New throw box")))
{
- ActionManager.NewHitBox();
+ ActionManager.NewThrowBox();
}
x += kToolbarControlSize;
}
@@ -821,7 +830,7 @@ namespace ActionTool
Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize);
if (GUI.Button(rect, new GUIContent(" + ", m_UITextureNewDefendBox, "New guard box")))
{
- ActionManager.NewHitBox();
+ ActionManager.NewDefendBox();
}
x += kToolbarControlSize;
}
@@ -832,7 +841,7 @@ namespace ActionTool
Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize);
if (GUI.Button(rect, new GUIContent(" + ", m_UITextureNewBlockBox, "New block box")))
{
- ActionManager.NewHitBox();
+ ActionManager.NewBlockBox();
}
x += kToolbarControlSize;
}
@@ -1052,6 +1061,6 @@ namespace ActionTool
eventMenu.ShowAsContext();
}
- }
+ }
} \ No newline at end of file