public GUI_group
        (
            GUI_window guiWindow,
            Group group,
            Rect drawingArea,
            GUIEventHandler eventHandler
        )
        {
            groupID          = group.groupID;
            windowID         = group.windowID;
            _group           = group;
            _guiWindow       = guiWindow;
            _eventHandler    = eventHandler;
            _drawingArea     = drawingArea;
            _groupLabel      = group.groupLabel ?? string.Empty;
            _columns         = group.columns;
            _horizontalSpace = group.horizontalSpace;
            _verticalSpace   = group.verticalSpace;
            _itemHeight      = group.itemHeight;
            _layout          = group.layout;

            if (group.groupType != GUI_Group_type.Scroll)
            {
                CalculateGroupGrid(_drawingArea);
                CreateGroup();
            }
        }
Beispiel #2
0
        public void DisableWindow(int windowID)
        {
            GUI_window window = GetWindowByID(windowID);

            if (window != null)
            {
                window.Enabled = false;
            }
        }
        public GUI_scrollView
        (
            GUI_window guiWindow,
            Group group,
            Rect drawingArea,
            GUIEventHandler eventHandler
        ) : base(guiWindow, group, drawingArea, eventHandler)
        {
            _maxShowItems  = group.maxShowItems;
            _verticalSpace = 2;

            CalculateClientRect();

            CalculateGroupGrid(_clientRect);

            CreateGroup();
        }
Beispiel #4
0
        private void CreateGroups()
        {
            List <Group> groups = new List <Group>();

            iGUI.GetGroups(ref groups);

            foreach (Group group in groups)
            {
                GUI_window thisWindow = GetWindowByID(group.windowID);

                switch (group.groupType)
                {
                case GUI_Group_type.Normal:
                    guiGroups.Add(new GUI_group(thisWindow, group, thisWindow.RemainDrawableArea, EventControl));
                    break;

                case GUI_Group_type.Scroll:
                    guiGroups.Add(new GUI_scrollView(thisWindow, group, thisWindow.RemainDrawableArea, EventControl));
                    break;
                }
            }
        }