summaryrefslogtreecommitdiff
path: root/Assets/ActionTool
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/ActionTool')
-rw-r--r--Assets/ActionTool/Editor/ActionEditorStyles.cs6
-rw-r--r--Assets/ActionTool/Editor/ActionPreviewEditor.cs17
2 files changed, 21 insertions, 2 deletions
diff --git a/Assets/ActionTool/Editor/ActionEditorStyles.cs b/Assets/ActionTool/Editor/ActionEditorStyles.cs
index b424a8c6..6059f93a 100644
--- a/Assets/ActionTool/Editor/ActionEditorStyles.cs
+++ b/Assets/ActionTool/Editor/ActionEditorStyles.cs
@@ -9,6 +9,7 @@ namespace ActionTool
{
public GUIStyle textBoldBig;
public GUIStyle textBoldSmall;
+ public GUIStyle textBoldSmallMid;
public GUIStyle textBold;
public GUIStyle selectObj;
public GUIStyle textSmall;
@@ -69,6 +70,11 @@ namespace ActionTool
s.fontSize = 9;
s.fontStyle = FontStyle.Bold;
});
+ InitStyle(out textBoldSmallMid, GUI.skin.label, s => {
+ s.fontSize = 9;
+ s.fontStyle = FontStyle.Bold;
+ s.alignment = TextAnchor.MiddleCenter;
+ });
InitStyle(out selectObj, GUI.skin.button, s => {
s.normal.background = selectIcon;
s.active.background = selectIcon;
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)