diff options
Diffstat (limited to 'Assets/ActionTool/Editor')
-rw-r--r-- | Assets/ActionTool/Editor/ActionEditorStyles.cs | 13 | ||||
-rw-r--r-- | Assets/ActionTool/Editor/ActionManager.cs | 1 | ||||
-rw-r--r-- | Assets/ActionTool/Editor/ActionNoteEditor.cs | 18 | ||||
-rw-r--r-- | Assets/ActionTool/Editor/ActionNoteEditor.cs.meta | 11 | ||||
-rw-r--r-- | Assets/ActionTool/Editor/ActionPreviewEditor.cs | 59 |
5 files changed, 75 insertions, 27 deletions
diff --git a/Assets/ActionTool/Editor/ActionEditorStyles.cs b/Assets/ActionTool/Editor/ActionEditorStyles.cs index 4b002537..08993560 100644 --- a/Assets/ActionTool/Editor/ActionEditorStyles.cs +++ b/Assets/ActionTool/Editor/ActionEditorStyles.cs @@ -27,6 +27,8 @@ namespace ActionTool public GUIStyle starButton;
public GUIStyle starButton2;
+ public GUIStyle infoButton;
+
public Texture2D selectIcon;
public Texture2D keyFrameIcon;
public Texture2D addFileIcon;
@@ -60,7 +62,7 @@ namespace ActionTool addFileIcon = EditorGUIUtility.FindTexture("d_Collab.FileAdded");
saveFileIcon = EditorGUIUtility.FindTexture("d_Collab.FileUpdated");
deleteIcon = EditorGUIUtility.FindTexture("d_P4_DeletedLocal");
- infoIcon = EditorGUIUtility.FindTexture("console.infoicon");
+ infoIcon = EditorGUIUtility.FindTexture("UnityEditor.InspectorWindow");
keyIcon = EditorGUIUtility.FindTexture("d_animationkeyframe");
starIcon = EditorGUIUtility.FindTexture("Favorite");
starIcon2 = EditorGUIUtility.FindTexture("Favorite Icon");
@@ -138,7 +140,14 @@ namespace ActionTool s.hover.background = starIcon2;
s.focused.background = starIcon2;
});
- InitStyle(out toggleSmallBold, GUI.skin.toggle, s => {
+ InitStyle(out infoButton, GUI.skin.button, s =>
+ {
+ s.normal.background = infoIcon;
+ s.active.background = infoIcon;
+ s.hover.background = infoIcon;
+ s.focused.background = infoIcon;
+ });
+ InitStyle(out toggleSmallBold, GUI.skin.toggle, s => {
s.fontSize = 10;
//s.fontStyle = FontStyle.Bold;
});
diff --git a/Assets/ActionTool/Editor/ActionManager.cs b/Assets/ActionTool/Editor/ActionManager.cs index cb0d5d71..d9279745 100644 --- a/Assets/ActionTool/Editor/ActionManager.cs +++ b/Assets/ActionTool/Editor/ActionManager.cs @@ -276,6 +276,7 @@ namespace ActionTool s_Animator.applyRootMotion = false;
s_Gizmos = s_RootActionTool.AddComponent<ActionToolGizmos>();
+ s_Gizmos.Initialize(unitRoot);
Settings = AssetDatabase.LoadAssetAtPath<ActionToolSettings>(s_SettingPath);
}
diff --git a/Assets/ActionTool/Editor/ActionNoteEditor.cs b/Assets/ActionTool/Editor/ActionNoteEditor.cs new file mode 100644 index 00000000..fcc4e08a --- /dev/null +++ b/Assets/ActionTool/Editor/ActionNoteEditor.cs @@ -0,0 +1,18 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class ActionNoteEditor : MonoBehaviour
+{
+ // Start is called before the first frame update
+ void Start()
+ {
+
+ }
+
+ // Update is called once per frame
+ void Update()
+ {
+
+ }
+}
diff --git a/Assets/ActionTool/Editor/ActionNoteEditor.cs.meta b/Assets/ActionTool/Editor/ActionNoteEditor.cs.meta new file mode 100644 index 00000000..a47cc903 --- /dev/null +++ b/Assets/ActionTool/Editor/ActionNoteEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 48a105c4026c65b428a22db4c350c5ef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: 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)
{
|