public void Show(Vector2 menuPosition, float width = 40)
        {
            if (items.Count <= 0)
            {
                return;
            }
            minWidth = width;
            CalculateRects(items, CanvasGUI.GUItoWindowPosition(menuPosition));
            groupsToDraw = new List <ItemGroup> ()
            {
                items
            };

            OnShow();
        }
        public GenericMenu(Rect newBoundingRect)
        {
            items     = new ItemGroup();
            controlID = GUIUtility.GetControlID(items.GetHashCode(), FocusType.Keyboard, new Rect(CanvasGUI.GUItoWindowPosition(items.position.position), items.position.size));

            if (newBoundingRect != Rect.zero)
            {
                boundingRect = newBoundingRect;
            }
        }
 public GenericMenu()
 {
     items     = new ItemGroup();
     controlID = GUIUtility.GetControlID(items.GetHashCode(), FocusType.Keyboard, new Rect(CanvasGUI.GUItoWindowPosition(items.position.position), items.position.size));
 }