示例#1
0
        private void CloseCategoryMenu()
        {
            RemoveChild(CategoryMenu);
            CategoryMenu = null;

            SetItemsClickable(true);
        }
示例#2
0
        private void OpenCategoryMenu()
        {
            var chestData = ChestDataManager.GetChestData(Chest);

            CategoryMenu          = new CategoryMenu(chestData, ItemDataManager, TooltipManager);
            CategoryMenu.Position = new Point(
                ItemGrabMenu.xPositionOnScreen + ItemGrabMenu.width / 2 - CategoryMenu.Width / 2 - 6 * Game1.pixelZoom,
                ItemGrabMenu.yPositionOnScreen - 10 * Game1.pixelZoom
                );
            CategoryMenu.OnClose += CloseCategoryMenu;
            AddChild(CategoryMenu);

            SetItemsClickable(false);
        }