SetTallMode() public method

public SetTallMode ( UnityEditorInternal.AnimationWindowHierarchyNode node, bool tallMode ) : void
node UnityEditorInternal.AnimationWindowHierarchyNode
tallMode bool
return void
Esempio n. 1
0
 private void DoFoldout(AnimationWindowHierarchyNode node, Rect rect, float indent)
 {
     if (this.m_TreeView.data.IsExpandable((TreeViewItem)node))
     {
         Rect position = rect;
         position.x     = indent;
         position.width = this.k_FoldoutWidth;
         EditorGUI.BeginChangeCheck();
         bool expand = GUI.Toggle(position, this.m_TreeView.data.IsExpanded((TreeViewItem)node), GUIContent.none, TreeViewGUI.s_Styles.foldout);
         if (!EditorGUI.EndChangeCheck())
         {
             return;
         }
         if (Event.current.alt)
         {
             this.m_TreeView.data.SetExpandedWithChildren((TreeViewItem)node, expand);
         }
         else
         {
             this.m_TreeView.data.SetExpanded((TreeViewItem)node, expand);
         }
         if (!expand)
         {
             return;
         }
         this.m_TreeView.UserExpandedNode((TreeViewItem)node);
     }
     else
     {
         AnimationWindowHierarchyPropertyNode hierarchyPropertyNode = node as AnimationWindowHierarchyPropertyNode;
         AnimationWindowHierarchyState        state = this.m_TreeView.state as AnimationWindowHierarchyState;
         if (hierarchyPropertyNode == null || !hierarchyPropertyNode.isPptrNode)
         {
             return;
         }
         Rect position = rect;
         position.x     = indent;
         position.width = this.k_FoldoutWidth;
         EditorGUI.BeginChangeCheck();
         bool tallMode1 = state.GetTallMode((AnimationWindowHierarchyNode)hierarchyPropertyNode);
         bool tallMode2 = GUI.Toggle(position, tallMode1, GUIContent.none, TreeViewGUI.s_Styles.foldout);
         if (!EditorGUI.EndChangeCheck())
         {
             return;
         }
         state.SetTallMode((AnimationWindowHierarchyNode)hierarchyPropertyNode, tallMode2);
     }
 }
Esempio n. 2
0
 private void DoFoldout(AnimationWindowHierarchyNode node, Rect rect, float indent, int row)
 {
     if (this.m_TreeView.data.IsExpandable(node))
     {
         Rect position = rect;
         position.x     = indent;
         position.width = this.k_FoldoutWidth;
         EditorGUI.BeginChangeCheck();
         bool flag = GUI.Toggle(position, this.m_HierarchyItemFoldControlIDs[row], this.m_TreeView.data.IsExpanded(node), GUIContent.none, TreeViewGUI.s_Styles.foldout);
         if (EditorGUI.EndChangeCheck())
         {
             if (Event.current.alt)
             {
                 this.m_TreeView.data.SetExpandedWithChildren(node, flag);
             }
             else
             {
                 this.m_TreeView.data.SetExpanded(node, flag);
             }
             if (flag)
             {
                 this.m_TreeView.UserExpandedItem(node);
             }
         }
     }
     else
     {
         AnimationWindowHierarchyPropertyNode animationWindowHierarchyPropertyNode = node as AnimationWindowHierarchyPropertyNode;
         AnimationWindowHierarchyState        animationWindowHierarchyState        = this.m_TreeView.state as AnimationWindowHierarchyState;
         if (animationWindowHierarchyPropertyNode != null && animationWindowHierarchyPropertyNode.isPptrNode)
         {
             Rect position2 = rect;
             position2.x     = indent;
             position2.width = this.k_FoldoutWidth;
             EditorGUI.BeginChangeCheck();
             bool flag2 = animationWindowHierarchyState.GetTallMode(animationWindowHierarchyPropertyNode);
             flag2 = GUI.Toggle(position2, this.m_HierarchyItemFoldControlIDs[row], flag2, GUIContent.none, TreeViewGUI.s_Styles.foldout);
             if (EditorGUI.EndChangeCheck())
             {
                 animationWindowHierarchyState.SetTallMode(animationWindowHierarchyPropertyNode, flag2);
             }
         }
     }
 }
 private void DoFoldout(AnimationWindowHierarchyNode node, Rect rect, float indent)
 {
     if (base.m_TreeView.data.IsExpandable(node))
     {
         Rect position = rect;
         position.x     = indent;
         position.width = base.k_FoldoutWidth;
         EditorGUI.BeginChangeCheck();
         bool expand = GUI.Toggle(position, base.m_TreeView.data.IsExpanded(node), GUIContent.none, TreeViewGUI.s_Styles.foldout);
         if (EditorGUI.EndChangeCheck())
         {
             if (Event.current.alt)
             {
                 base.m_TreeView.data.SetExpandedWithChildren(node, expand);
             }
             else
             {
                 base.m_TreeView.data.SetExpanded(node, expand);
             }
             if (expand)
             {
                 base.m_TreeView.UserExpandedNode(node);
             }
         }
     }
     else
     {
         AnimationWindowHierarchyPropertyNode node2 = node as AnimationWindowHierarchyPropertyNode;
         AnimationWindowHierarchyState        state = base.m_TreeView.state as AnimationWindowHierarchyState;
         if ((node2 != null) && node2.isPptrNode)
         {
             Rect rect3 = rect;
             rect3.x     = indent;
             rect3.width = base.k_FoldoutWidth;
             EditorGUI.BeginChangeCheck();
             bool tallMode = state.GetTallMode(node2);
             tallMode = GUI.Toggle(rect3, tallMode, GUIContent.none, TreeViewGUI.s_Styles.foldout);
             if (EditorGUI.EndChangeCheck())
             {
                 state.SetTallMode(node2, tallMode);
             }
         }
     }
 }
        // Draw foldout (after text content above to ensure drop down icon is rendered above selection highlight)
        private void DoFoldout(AnimationWindowHierarchyNode node, Rect rect, float indent, int row)
        {
            if (m_TreeView.data.IsExpandable(node))
            {
                Rect toggleRect = rect;
                toggleRect.x     = indent;
                toggleRect.width = foldoutStyleWidth;
                EditorGUI.BeginChangeCheck();
                bool newExpandedValue = GUI.Toggle(toggleRect, m_HierarchyItemFoldControlIDs[row], m_TreeView.data.IsExpanded(node), GUIContent.none, foldoutStyle);
                if (EditorGUI.EndChangeCheck())
                {
                    if (Event.current.alt)
                    {
                        m_TreeView.data.SetExpandedWithChildren(node, newExpandedValue);
                    }
                    else
                    {
                        m_TreeView.data.SetExpanded(node, newExpandedValue);
                    }
                }
            }
            else
            {
                AnimationWindowHierarchyPropertyNode hierarchyPropertyNode = node as AnimationWindowHierarchyPropertyNode;
                AnimationWindowHierarchyState        hierarchyState        = m_TreeView.state as AnimationWindowHierarchyState;

                if (hierarchyPropertyNode != null && hierarchyPropertyNode.isPptrNode)
                {
                    Rect toggleRect = rect;
                    toggleRect.x     = indent;
                    toggleRect.width = foldoutStyleWidth;

                    EditorGUI.BeginChangeCheck();
                    bool tallMode = hierarchyState.GetTallMode(hierarchyPropertyNode);
                    tallMode = GUI.Toggle(toggleRect, m_HierarchyItemFoldControlIDs[row], tallMode, GUIContent.none, foldoutStyle);
                    if (EditorGUI.EndChangeCheck())
                    {
                        hierarchyState.SetTallMode(hierarchyPropertyNode, tallMode);
                    }
                }
            }
        }