public void Init(KeyControl keyController, ShipModel ship, UIRemodelEquipSlotItem slotItem)
        {
            this.ship     = ship;
            this.slotItem = slotItem;
            this.group    = this.GetHashCode();
            if (keyController != null)
            {
                keyController.ClearKeyAll();
                keyController.firstUpdate = true;
            }
            this.keyController = keyController;
            if (this.items == null)
            {
                this.items = new List <CategoryMenuItem>();
            }
            this.items.Clear();
            int index = 0;

            CategoryMenuItem[] componentsInChildren = this.itemContainer.get_transform().GetComponentsInChildren <CategoryMenuItem>();
            for (int i = 0; i < componentsInChildren.Length; i++)
            {
                CategoryMenuItem categoryMenuItem = componentsInChildren[i];
                categoryMenuItem.Init(this, index, this.selectableCategories.IndexOf(this.Categories[index++]) != -1);
                this.items.Add(categoryMenuItem);
            }
            for (int j = 0; j < this.items.get_Count(); j++)
            {
                if (this.changeCurrentItem(j))
                {
                    this._BeforeIdx = j;
                    break;
                }
            }
            bool flag = slotItem.GetModel() != null;

            if (flag)
            {
                this.removeItem.Init(this, -1, true);
            }
            this.removeItem.SetActive(flag);
        }