DrawBackground() protected static méthode

protected static DrawBackground ( int row, bool selected ) : void
row int
selected bool
Résultat void
Exemple #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);
            }
        }