summaryrefslogtreecommitdiff
path: root/Assets/ActionTool/Editor/ActionPreviewEditor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs')
-rw-r--r--Assets/ActionTool/Editor/ActionPreviewEditor.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
index f277ce97..f0a828fc 100644
--- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs
+++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
@@ -555,11 +555,27 @@ namespace ActionTool
var animEvent = animEvents[i];
if (animEvent == null)
continue;
+
+ Color bgColor = Color.black;
+ if(ActionManager.Settings != null)
+ {
+ bgColor = ActionManager.Settings.GetColor(animEvent.type.ToString());
+ }
Vector2 pos = new Vector2(kTimeLineViewXOffset + frame * kFrameWidth, y);
Rect frameRect = new Rect(pos.x, pos.y, kFrameWidth, kFrameHeight);
bool isSelect = ActionManager.animationEvent == animEvent;
- bool frameSelect = GUI.Toggle(frameRect, isSelect, "E", styles.keyFrameButton);
- if(!isSelect && frameSelect)
+ Color prevColor = GUI.backgroundColor;
+ GUI.backgroundColor = bgColor;
+ bool frameSelect = GUI.Toggle(frameRect, isSelect, new GUIContent("", animEvent.Name), styles.keyFrameButton);
+ GUI.backgroundColor = prevColor;
+
+ Rect labelRect = new Rect(pos.x - 1, pos.y + 2, kFrameWidth, kFrameHeight);
+ Color col = GUI.color;
+ GUI.color = Color.yellow;
+ GUI.Label(labelRect, animEvent.shortName, styles.textBold);
+ GUI.color = col;
+
+ if (!isSelect && frameSelect)
{
ActionManager.OnSelectAnimationEvent(animEvent);
}