private void CloseCategoryMenu() { RemoveChild(CategoryMenu); CategoryMenu = null; SetItemsClickable(true); }
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); }