summaryrefslogtreecommitdiff
path: root/Assets/ActionTool/Editor/ActionEditor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/ActionTool/Editor/ActionEditor.cs')
-rw-r--r--Assets/ActionTool/Editor/ActionEditor.cs23
1 files changed, 18 insertions, 5 deletions
diff --git a/Assets/ActionTool/Editor/ActionEditor.cs b/Assets/ActionTool/Editor/ActionEditor.cs
index 71942d34..2835714a 100644
--- a/Assets/ActionTool/Editor/ActionEditor.cs
+++ b/Assets/ActionTool/Editor/ActionEditor.cs
@@ -15,11 +15,13 @@ namespace ActionTool
ActionManager.AnimationWindow = GetWindow<ActionEditor>();
}
- private string m_SearchText = "";
+ string m_SearchText = "";
+ ActionEditorStyles styles;
+ ActionEditorUI ui;
public void OnEnable()
{
-
+ titleContent = new GUIContent("Action Editor");
}
public void OnDisable()
@@ -28,6 +30,11 @@ namespace ActionTool
public void OnGUI()
{
+ if (styles == null) styles = ActionEditorStyles.Get();
+ if (ui == null) ui = ActionEditorUI.Get();
+ if (ActionManager.CurrentUnit == null)
+ ActionManager.Release();
+
GUILayout.Space(5);
GUI_SelectUnit();
GUILayout.Space(5);
@@ -68,7 +75,7 @@ namespace ActionTool
private void GUI_AnimationList()
{
if (!ActionManager.HasSelectObj())
- return;
+ return;
string unitName = ActionManager.GetUnitName();
@@ -102,11 +109,17 @@ namespace ActionTool
if (!show)
continue;
bool bChecked = ActionManager.CurrentAnimationName == animName;
- bool check = GUILayout.Toggle(bChecked, animName, style, GUILayout.Height(15));
+ EditorGUILayout.BeginHorizontal();
+ bool check = GUILayout.Toggle(bChecked, animName, style, GUILayout.Width(position.width - 42), GUILayout.Height(15));
if (check && ActionManager.CurrentAnimationName != animName)
ActionManager.OnSelectAnimation(animName);
+ if(GUILayout.Button("", styles.selectObj, GUILayout.Width(15), GUILayout.Height(15)))
+ {
+ ui.SelectObject(file);
+ }
+ EditorGUILayout.EndHorizontal();
}
-
+
EditorGUILayout.EndScrollView();
style.alignment = prevAnchor;