UnityEditor.MemoryTreeList.GenerateRect C# (CSharp) Method

GenerateRect() protected static method

protected static GenerateRect ( int row ) : Rect
row int
return UnityEngine.Rect
        protected static Rect GenerateRect(int row)
        {
            return new Rect(1f, 16f * row, GUIClip.visibleRect.width, 16f);
        }

Usage Example

Exemplo n.º 1
0
        protected virtual void DrawItem(MemoryElement memoryElement, ref int row, int indent)
        {
            bool flag = this.m_MemorySelection.isSelected(memoryElement);

            MemoryTreeList.DrawBackground(row, flag);
            Rect rect = MemoryTreeList.GenerateRect(row);

            rect.x = 4f + (float)indent * 16f - 14f;
            Rect position = rect;

            position.width = 14f;
            if (memoryElement.ChildCount() > 0)
            {
                memoryElement.expanded = GUI.Toggle(position, memoryElement.expanded, GUIContent.none, MemoryTreeList.styles.foldout);
            }
            rect.x += 14f;
            if (flag)
            {
                this.m_SelectionOffset = (float)row * 16f;
            }
            if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition))
            {
                this.RowClicked(Event.current, memoryElement);
            }
            this.DrawData(rect, memoryElement, indent, row, flag);
            if (memoryElement.expanded)
            {
                this.DrawRecursiveData(memoryElement, ref row, indent + 1);
            }
        }
All Usage Examples Of UnityEditor.MemoryTreeList::GenerateRect