示例#1
0
    public void AddNewContainer(List <ItemInstance> items, int id, int tabGfxItemId)
    {
        var numOpenContainers = GetNumberOfOpenContainers();
        var containerWindow   =
            new ContainerWindow(new Vector2(0, Math.Min(Screen.height - 120, (numOpenContainers - 2) * 120)))
        {
            ScaleXY       = 1.5f,
            SelectedColor = new Color32(0, 0, 255, 100)
        };

        containerWindow.Set(items, id);
        TabbedGui.Add(ContentManager.GetItem(tabGfxItemId).Animations[0], containerWindow, true);
    }
示例#2
0
 public void OpenRecipeBook(ItemInstance item)
 {
     if (item.Item.Id == 0)
     {
         return;
     }
     if (_recipeBook != null)
     {
         TabbedGui.Remove(_recipeBook);
     }
     _recipeBook = new RecipeBookWindow(Vector2.zero, item)
     {
         ScaleXY = GridiaConstants.GuiScale
     };
     TabbedGui.Add(2008, _recipeBook, true);
 }