public CustomCraftingMenu(
            int x,
            int y,
            int width,
            int height,
            List <Chest> material_containers, List <string> craftingRecipes, List <string> cookingRecipes)
            : base(x, y, width, height, false)
        {
            inventory = new InventoryMenu(xPositionOnScreen + spaceToClearSideBorder + borderWidth, yPositionOnScreen + spaceToClearTopBorder + borderWidth + 320 - 16, false, (IList <Item>)null, (InventoryMenu.highlightThisItem)null, -1, 3, 0, 0, true);
            inventory.showGrayedOutSlots   = true;
            currentPageClickableComponents = new List <ClickableComponent>();
            foreach (ClickableComponent clickableComponent in inventory.GetBorder(InventoryMenu.BorderSide.Top))
            {
                clickableComponent.upNeighborID = -99998;
            }
            _materialContainers = material_containers;
            List <Chest> materialContainers = _materialContainers;

            initializeUpperRightCloseButton();
            ClickableTextureComponent textureComponent1 = new ClickableTextureComponent(new Rectangle(xPositionOnScreen + width + 4, yPositionOnScreen + height - 192 - 32 - borderWidth - 104, 64, 104), Game1.mouseCursors, new Rectangle(564 + Game1.player.trashCanLevel * 18, 102, 18, 26), 4f, false);

            textureComponent1.myID = 106;
            trashCan = textureComponent1;
            dropItemInvisibleButton = new ClickableComponent(new Rectangle(xPositionOnScreen - borderWidth - spaceToClearSideBorder - 64, trashCan.bounds.Y, 64, 64), "")
            {
                myID            = 107,
                rightNeighborID = 0
            };

            layoutRecipe(craftingRecipes, cookingRecipes);
            if (pagesOfCraftingRecipes.Count > 1)
            {
                ClickableTextureComponent textureComponent2 = new ClickableTextureComponent(new Rectangle(xPositionOnScreen + 768 + 32, craftingPageY(), 64, 64), Game1.mouseCursors, Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, 12, -1, -1), 0.8f, false);
                textureComponent2.myID            = 88;
                textureComponent2.downNeighborID  = 89;
                textureComponent2.rightNeighborID = 106;
                textureComponent2.leftNeighborID  = -99998;
                upButton = textureComponent2;
                ClickableTextureComponent textureComponent3 = new ClickableTextureComponent(new Rectangle(xPositionOnScreen + 768 + 32, craftingPageY() + 192 + 32, 64, 64), Game1.mouseCursors, Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, 11, -1, -1), 0.8f, false);
                textureComponent3.myID            = 89;
                textureComponent3.upNeighborID    = 88;
                textureComponent3.rightNeighborID = 106;
                textureComponent3.leftNeighborID  = -99998;
                downButton = textureComponent3;
            }
            _UpdateCurrentPageButtons();
            if (!Game1.options.SnappyMenus)
            {
                return;
            }
            snapToDefaultClickableComponent();
        }