From 09fe2bbb41e25e176ac26da56360899870ad80ec Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 3 Sep 2021 17:57:48 +0800 Subject: *misc --- Assets/ActionTool/Editor/ActionPreviewEditor.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs') diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs index 1e4204c2..56e5b486 100644 --- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs +++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs @@ -573,7 +573,7 @@ namespace ActionTool continue; int frame = posData.frame; Vector2 pos = new Vector2(kTimeLineViewXOffset + frame * kFrameWidth, y); - if(GUI.Button(new Rect(pos.x - 1, pos.y + 3, kFrameWidth + 1, kFrameWidth), "", styles.keyButton)) + if(GUI.Button(new Rect(pos.x - 1, pos.y + 4, kFrameWidth + 1, kFrameWidth), "", styles.keyButton)) { ActionManager.actionData.SetCurrentAnimTime(frame); } @@ -859,10 +859,23 @@ namespace ActionTool void GUI_Events() { + float y = m_GridY; + Rect rect = new Rect(kTimeLineViewXOffset - 17, y - 1, 17, (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight); + if (GUI.Button(rect, "", styles.boxToggle)) + { + AnimationData animData = ActionManager.animationData; + ActionInfoEditor.ShowContent("Event Info", + "Events: " + (animData.animationEvents == null ? 0 : animData.animationEvents.Count) + ); + } + Rect lb = rect; + lb.y += 3; + lb.x += 2; + GUI.Label(lb, "EV", styles.textBoldSmallMid); DrawAllEvents(); GenericMenu_Event(); } - + void DrawAllEvents() { if (ActionManager.animationData == null) -- cgit v1.1-26-g67d0