From 776b3a1b6a766f8e0cdb1d941fff4c8fbef24ada Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 13 Sep 2021 17:47:40 +0800 Subject: +anim --- Assets/ActionTool/Editor/ActionPreviewEditor.cs | 59 ++++++++++++++----------- 1 file changed, 34 insertions(+), 25 deletions(-) (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs') diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs index a305ad72..eb3c95ba 100644 --- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs +++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs @@ -261,6 +261,15 @@ namespace ActionTool "FrameRate: " + ActionManager.curClip.frameRate ); } + if (animationData) + { + Color bgColor = GUI.backgroundColor; + GUI.backgroundColor = animationData.note != null && animationData.note != "" ? bgColor : Color.gray; + if (GUI.Button(new Rect(xr + width + 10 + 50 + 10, y, 16, 14), "", styles.infoButton)) + { + } + GUI.backgroundColor = bgColor; + } y += 15; GUI.Label(new Rect(xl, y, 105, 15), "AnimationData:", styles.textMiddle); @@ -795,31 +804,31 @@ namespace ActionTool x += kToolbarControlSize; } - void GUI_Toolbar_Detail(ref float x, ref float y) - { - x += kToolbarControlMargin + 20; - Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize); - GUI.enabled = !m_IsLeftOrRightButtonClicked && ActionManager.colliderData != null; - if (GUI.Button(rect, new GUIContent(styles.infoIcon, "Detail"))) - { - ActionManager.EditCollider(); - } - GUI.enabled = true; - x += kToolbarControlSize; - } - - void GUI_Toolbar_Delete(ref float x, ref float y) - { - x += kToolbarControlMargin; - Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize); - GUI.enabled = !m_IsLeftOrRightButtonClicked && ActionManager.colliderData != null; - if (GUI.Button(rect, new GUIContent(styles.deleteIcon, "Delete this collider"))) - { - ActionManager.DeleteCurBox(); - } - GUI.enabled = true; - x += kToolbarControlSize; - } + //void GUI_Toolbar_Detail(ref float x, ref float y) + //{ + // x += kToolbarControlMargin + 20; + // Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize); + // GUI.enabled = !m_IsLeftOrRightButtonClicked && ActionManager.colliderData != null; + // if (GUI.Button(rect, new GUIContent(styles.infoIcon, "Detail"))) + // { + // ActionManager.EditCollider(); + // } + // GUI.enabled = true; + // x += kToolbarControlSize; + //} + + //void GUI_Toolbar_Delete(ref float x, ref float y) + //{ + // x += kToolbarControlMargin; + // Rect rect = new Rect(x, y, kToolbarControlSize, kToolbarControlSize); + // GUI.enabled = !m_IsLeftOrRightButtonClicked && ActionManager.colliderData != null; + // if (GUI.Button(rect, new GUIContent(styles.deleteIcon, "Delete this collider"))) + // { + // ActionManager.DeleteCurBox(); + // } + // GUI.enabled = true; + // x += kToolbarControlSize; + //} void GUI_Toolbar_NewAnimationData(ref float x, ref float y) { -- cgit v1.1-26-g67d0