UnityEditor.Graphs.ParameterControllerView.OnDrawParameter C# (CSharp) Method

OnDrawParameter() private method

private OnDrawParameter ( Rect rect, int index, bool selected, bool focused ) : void
rect UnityEngine.Rect
index int
selected bool
focused bool
return void
        private void OnDrawParameter(Rect rect, int index, bool selected, bool focused)
        {
            Event current = Event.current;
            if (((current.type == EventType.MouseUp) && (current.button == 1)) && rect.Contains(current.mousePosition))
            {
                GenericMenu menu = new GenericMenu();
                menu.AddItem(new GUIContent("Delete"), false, new GenericMenu.MenuFunction(this.DeleteParameter));
                menu.ShowAsContext();
                Event.current.Use();
            }
            if (index < this.m_ParameterList.list.Count)
            {
                Element element = this.m_ParameterList.list[index] as Element;
                rect.yMin += 2f;
                rect.yMax -= 3f;
                element.OnGUI(rect, index);
            }
        }