コード例 #1
0
 internal void OnGUI()
 {
     TreeCenter.OnGUI(position, this == focusedWindow);
     if (Event.current.isKey && Event.current.keyCode == KeyCode.F && Event.current.control)
     {
         TreeSearchWindow.Open(this);
     }
 }
コード例 #2
0
        internal static bool AutotOpenCanvas(int instanceId, int line)
        {
            string path = AssetDatabase.GetAssetPath(EditorUtility.InstanceIDToObject(instanceId));
            string name = Application.dataPath + "/" + path.Replace("Assets/", "");

            if (name.EndsWith(".tree"))
            {
                TreeCenter.ManuOpen(path);
                Open();
            }
            return(false);
        }
コード例 #3
0
        internal void OnEnable()
        {
            PResourceManager.SetDefaultResourcePath("Assets/Res/Scripts/Editor/res/");
            Texture icon = PResourceManager.LoadTexture(EditorGUIUtility.isProSkin
                ? "Textures/Icon_Dark.png"
                : "Textures/Icon_Light.png");

            titleContent   = new GUIContent("Tree", icon);
            minSize        = new Vector2(250, 100);
            wantsMouseMove = true;
            TreeCenter.Start();
            PPaintCenter.ClientRepaints -= Repaint;
            PPaintCenter.ClientRepaints += Repaint;
        }
コード例 #4
0
        internal static void ExportAllData()
        {
            StringBuilder   sb    = new StringBuilder();
            ProgressCommand c     = new ProgressCommand();
            ProgressCommand child = TreeCenter.GetExportAllCommand();

            if (child != null)
            {
                sb.Append("Tree export \r\n");
                c.Add(child);
            }
            child = MachineCenter.GetExportCommand();
            if (child != null)
            {
                sb.Append("Machine export \r\n");
                c.Add(child);
            }
            c.notify  = sb.ToString();
            c.refresh = true;
            c.StartCommand();
        }
コード例 #5
0
 internal void OnDestroy()
 {
     PPaintCenter.ClientRepaints -= Repaint;
     TreeCenter.Stop();
 }