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(); }
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(); }