コード例 #1
0
 public void Show(Vector2 pos, float MinWidth = 40)
 {
     minWidth     = MinWidth;
     position     = calculateRect(pos, menuItems, minWidth);
     selectedPath = "";
     OverlayGUI.OpenPopup(this);
 }
コード例 #2
0
        public void Draw()
        {
            int inRect = DrawGroup(position, menuItems);

            while (groupToDraw != null && !close)
            {
                MenuItem group = groupToDraw;
                groupToDraw = null;
                if (group.group)                 // Draw group and find if the mouse is in group rect
                {
                    inRect = Mathf.Max(inRect, DrawGroup(group.groupPos, group.subItems));
                }
            }

            if (close || inRect < 2 || (Event.current.type == EventType.MouseDown && inRect < 3))
            {
                OverlayGUI.ClosePopup();
            }

            NodeEditor.RepaintClients();
        }
コード例 #3
0
        public void Draw()
        {
            bool inRect = DrawGroup(position, menuItems);

            while (groupToDraw != null && !close)
            {
                MenuItem group = groupToDraw;
                groupToDraw = null;
                if (group.group)
                {
                    if (DrawGroup(group.groupPos, group.subItems))
                    {
                        inRect = true;
                    }
                }
            }

            if (!inRect || close)
            {
                OverlayGUI.ClosePopup();
            }

            NodeEditorFramework.NodeEditor.RepaintClients();
        }