Exemple #1
0
        public Shapes(Mod game, Rectangle rect)
            : base(rect, "Shapes")
        {
            Game = game;

            // Add controls to the tab page

            CircleSides = new XG_PlusMinus(new Rectangle(10, 25, 100, 60), "Circle Sides", null,1f, true, true, 3, 200);
            Children.Add(CircleSides);

            Rotation = new XG_PlusMinus(new Rectangle(10, 60, 100, 60), "Rotation", null, 0.0005f, true, true, 0, 0.401f,0.01f, "F3");
            Rotation._Value = 0.020f;
            Children.Add(Rotation);

            hollow = new XG_ButtonLabelBool(new Rectangle(200, 20, 100, 60), "hollow", null, true);
            Children.Add(hollow);

            Fill = new XG_ButtonLabelBool(new Rectangle(200, 60, 100, 60), "Fill", Fill_Clicked, true);
            Children.Add(Fill);

            tiles = new XG_ButtonLabelBool(new Rectangle(280, 20, 100, 60), "Tiles", null, true);
            Children.Add(tiles);

            walls = new XG_ButtonLabelBool(new Rectangle(280, 65, 100, 60), "Walls", null, true);
            Children.Add(walls);

            Children.Add(new XG_Button(new Rectangle(350, 80, 75, 20), "UndoVert", this.undoVert_Clicked));

             Children.Add(new XG_Button(new Rectangle(350, 5, 60, 20), "House", this.Casa_Clicked));
            Build = new XG_Button(new Rectangle(350, 35, 60, 20), "Build", this.Build_Clicked);
            Children.Add(Build);
        }
Exemple #2
0
        public Give(Mod game, Rectangle rect)
            : base(rect, "Give")
        {
            Game = game;

            // Add controls to the tab page
            onclick = new XG_ButtonLabelBool(new Rectangle(10, -10, 100, 60), "on Click", null, true);
            Children.Add(onclick);
            onPlayer = new XG_Button(new Rectangle(10, 50, 60, 20), "on Player", this.Onplayer_Clicked );
            Children.Add(onPlayer);

            string text = "Stack";
            STACK = new XG_PlusMinus(new Rectangle(10, 70, 100, 60), text, this.Cuantity_Clicked,1f,true,true,1f,250f,1f,"F1",true);
            Children.Add(STACK);

            Tree = new XGTree(new Rectangle(110, 0, 300, 115), TreeItemClicked);
            Children.Add(Tree);

            XGTreeItem Tools = new XGTreeItem(Mod.ItemD.Tools.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Tools);
            for (int i = 0; i < Mod.ItemD.Tools.Sections.Length; i++) // add sections
            {
                XGTreeItem Tools_Sections = new XGTreeItem(Mod.ItemD.Tools.Sections[i], Main.inventoryBackTexture);
                Tools.Items.Add(Tools_Sections);
                for (int n = 0; n < Mod.ItemD.Tools.SectionNpcItems[i].Length; n++) // add section items
                {
                    Item item = new Item();
                    item.SetDefaults(Mod.ItemD.Tools.SectionNpcItems[i][n]);
                    XGTreeItem Tools_Section_items = new XGTreeItem(Mod.ItemD.Tools.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                    Tools_Sections.Items.Add(Tools_Section_items);

                }
            }

            XGTreeItem Weapons = new XGTreeItem(Mod.ItemD.Weapons.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Weapons);
            for (int i = 0; i < Mod.ItemD.Weapons.Sections.Length; i++) // add sections
            {
                XGTreeItem Weapons_Sections = new XGTreeItem(Mod.ItemD.Weapons.Sections[i], Main.inventoryBackTexture);
                Weapons.Items.Add(Weapons_Sections);
                for (int n = 0; n < Mod.ItemD.Weapons.SectionNpcItems[i].Length; n++) // add section items
                {

                    Item item = new Item();
                    item.SetDefaults(Mod.ItemD.Weapons.SectionNpcItems[i][n]);
                    XGTreeItem Weapons_Section_items = new XGTreeItem(Mod.ItemD.Weapons.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                    Weapons_Sections.Items.Add(Weapons_Section_items);

              }
            }

            XGTreeItem Furniture = new XGTreeItem(Mod.ItemD.Furniture.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Furniture);
            for (int i = 0; i < Mod.ItemD.Furniture.Sections.Length; i++) // add sections
            {
                XGTreeItem Furniture_Sections = new XGTreeItem(Mod.ItemD.Furniture.Sections[i], Main.inventoryBackTexture);
                Furniture.Items.Add(Furniture_Sections);
                for (int n = 0; n < Mod.ItemD.Furniture.SectionNpcItems[i].Length; n++) // add section items
                {
                    Item item = new Item();
                    item.SetDefaults(Mod.ItemD.Furniture.SectionNpcItems[i][n]);
                    XGTreeItem Furniture_Section_items = new XGTreeItem(Mod.ItemD.Furniture.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                    Furniture_Sections.Items.Add(Furniture_Section_items);

                }
            }

            XGTreeItem Miscellaneous = new XGTreeItem(Mod.ItemD.Miscellaneous.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Miscellaneous);
            for (int i = 0; i < Mod.ItemD.Miscellaneous.Sections.Length; i++) // add sections
            {
                XGTreeItem Miscellaneous_Sections = new XGTreeItem(Mod.ItemD.Miscellaneous.Sections[i], Main.inventoryBackTexture);
                Miscellaneous.Items.Add(Miscellaneous_Sections);
                for (int n = 0; n < Mod.ItemD.Miscellaneous.SectionNpcItems[i].Length; n++) // add section items
                {

                    Item item = new Item();
                    item.SetDefaults(Mod.ItemD.Miscellaneous.SectionNpcItems[i][n]);
                    XGTreeItem Miscellaneous_Section_items = new XGTreeItem(Mod.ItemD.Miscellaneous.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                    Miscellaneous_Sections.Items.Add(Miscellaneous_Section_items);

                       }
            }

            XGTreeItem Accessories = new XGTreeItem(Mod.ItemD.Accessories.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Accessories);
            for (int i = 0; i < Mod.ItemD.Accessories.Sections.Length; i++) // add sections
            {

                XGTreeItem Accessories_Sections = new XGTreeItem(Mod.ItemD.Accessories.Sections[i], Main.inventoryBackTexture);
                Accessories.Items.Add(Accessories_Sections);
                for (int n = 0; n < Mod.ItemD.Accessories.SectionNpcItems[i].Length; n++) // add section items
                {

                    Item item = new Item();
                    item.SetDefaults(Mod.ItemD.Accessories.SectionNpcItems[i][n]);
                    XGTreeItem Accessories_Section_items = new XGTreeItem(Mod.ItemD.Accessories.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                    Accessories_Sections.Items.Add(Accessories_Section_items);

             }
            }

            XGTreeItem Blocks = new XGTreeItem(Mod.ItemD.Blocks.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Blocks);
            for (int i = 0; i < Mod.ItemD.Blocks.Sections.Length; i++) // add sections
            {
                XGTreeItem Blocks_Sections = new XGTreeItem(Mod.ItemD.Blocks.Sections[i], Main.inventoryBackTexture);
                Blocks.Items.Add(Blocks_Sections);
                for (int n = 0; n < Mod.ItemD.Blocks.SectionNpcItems[i].Length; n++) // add section items
                {

                    Item item = new Item();
                    item.SetDefaults(Mod.ItemD.Blocks.SectionNpcItems[i][n]);
                    XGTreeItem Blocks_Section_items = new XGTreeItem(Mod.ItemD.Blocks.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                    Blocks_Sections.Items.Add(Blocks_Section_items);

                }
            }

            XGTreeItem Potions = new XGTreeItem(Mod.ItemD.Potions.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Potions);
            for (int i = 0; i < Mod.ItemD.Potions.Sections.Length; i++) // add sections
            {
                XGTreeItem Potions_Sections = new XGTreeItem(Mod.ItemD.Potions.Sections[i], Main.inventoryBackTexture);
                Potions.Items.Add(Potions_Sections);
                for (int n = 0; n < Mod.ItemD.Potions.SectionNpcItems[i].Length; n++) // add section items
                {
                    Item item = new Item();
                    item.SetDefaults(Mod.ItemD.Potions.SectionNpcItems[i][n]);
                    XGTreeItem Potions_Section_items = new XGTreeItem(Mod.ItemD.Potions.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                    Potions_Sections.Items.Add(Potions_Section_items);

                    }
            }

            XGTreeItem Defenseitems = new XGTreeItem(Mod.ItemD.Defenseitems.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(Defenseitems);
            for (int i = 0; i < Mod.ItemD.Defenseitems.Sections.Length; i++) // add sections
            {
                if (Mod.ItemD.Defenseitems.Sections[i] != "Armor Sets")
                {
                    XGTreeItem Defenseitems_Sections = new XGTreeItem(Mod.ItemD.Defenseitems.Sections[i], Main.inventoryBackTexture);
                    Defenseitems.Items.Add(Defenseitems_Sections);
                    for (int n = 0; n < Mod.ItemD.Defenseitems.SectionNpcItems[i].Length; n++) // add section items
                    {
                        Item item = new Item();
                        item.SetDefaults(Mod.ItemD.Defenseitems.SectionNpcItems[i][n]);
                        XGTreeItem Defenseitems_Section_items = new XGTreeItem(Mod.ItemD.Defenseitems.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                        Defenseitems_Sections.Items.Add(Defenseitems_Section_items);

                    }

                }
                else
                {

                    XGTreeItem ArmorSets = new XGTreeItem(Mod.ItemD.ArmorSets.Cathegory, Main.inventoryBackTexture);
                    Defenseitems.Items.Add(ArmorSets);
                    for (int t = 0; t < Mod.ItemD.ArmorSets.Sections.Length; t++) // add sections
                    {
                        XGTreeItem ArmorSets_Sections = new XGTreeItem(Mod.ItemD.ArmorSets.Sections[t], Main.inventoryBackTexture);
                        ArmorSets.Items.Add(ArmorSets_Sections);
                        for (int n = 0; n < Mod.ItemD.ArmorSets.SectionNpcItems[t].Length; n++) // add section items
                        {

                            Item item = new Item();
                            item.SetDefaults(Mod.ItemD.ArmorSets.SectionNpcItems[t][n]);
                            XGTreeItem ArmorSets_Section_items = new XGTreeItem(Mod.ItemD.ArmorSets.SectionNpcItems[t][n], Main.itemTexture[item.type]);
                            ArmorSets_Sections.Items.Add(ArmorSets_Section_items);

                       }
                    }
                }
            }

            XGTreeItem VanityItems = new XGTreeItem(Mod.ItemD.VanityItems.Cathegory, Main.inventoryBackTexture);
            Tree.Items.Add(VanityItems);
            for (int i = 0; i < Mod.ItemD.VanityItems.Sections.Length; i++) // add sections
            {
                if (Mod.ItemD.VanityItems.Sections[i] != "Vanity Sets")
                {
                    XGTreeItem VanityItems_Sections = new XGTreeItem(Mod.ItemD.VanityItems.Sections[i], Main.inventoryBackTexture);
                    VanityItems.Items.Add(VanityItems_Sections);
                    for (int n = 0; n < Mod.ItemD.VanityItems.SectionNpcItems[i].Length; n++) // add section items
                    {

                        Item item = new Item();
                        item.SetDefaults(Mod.ItemD.VanityItems.SectionNpcItems[i][n]);
                        XGTreeItem VanityItems_Section_items = new XGTreeItem(Mod.ItemD.VanityItems.SectionNpcItems[i][n], Main.itemTexture[item.type]);
                        VanityItems_Sections.Items.Add(VanityItems_Section_items);

             }

                }
                else
                {

                    XGTreeItem VanitySets = new XGTreeItem(Mod.ItemD.VanitySets.Cathegory, Main.inventoryBackTexture);
                    VanityItems.Items.Add(VanitySets);
                    for (int t = 0; t < Mod.ItemD.VanitySets.Sections.Length; t++) // add sections
                    {
                        XGTreeItem VanitySets_Sections = new XGTreeItem(Mod.ItemD.VanitySets.Sections[t], Main.inventoryBackTexture);
                        VanitySets.Items.Add(VanitySets_Sections);
                        for (int n = 0; n < Mod.ItemD.VanitySets.SectionNpcItems[t].Length; n++) // add section items
                        {

                            Item item = new Item();
                            item.SetDefaults(Mod.ItemD.VanitySets.SectionNpcItems[t][n]);
                            XGTreeItem VanitySets_Section_items = new XGTreeItem(Mod.ItemD.VanitySets.SectionNpcItems[t][n], Main.itemTexture[item.type]);
                            VanitySets_Sections.Items.Add(VanitySets_Section_items);

                        }
                    }
                }
            }

            XGTreeItem All = new XGTreeItem("All", Main.inventoryBackTexture);
            Tree.Items.Add(All);
            for (int i = 0; i < Main.itemName.Length; i++) // add sections
            {

                    Item item = new Item();
                    item.SetDefaults(Main.itemName[i]);
                    XGTreeItem All_items = new XGTreeItem(item.name, Main.itemTexture[item.type]);
                    All.Items.Add(All_items);

            }

            //Tree.ExpandAll();
        }
Exemple #3
0
        public Npcspawn(Mod game, Rectangle rect)
            : base(rect, "spawn")
        {
            Game = game;

            // Add controls to the tab page

             Count = new XG_PlusMinus(new Rectangle(10, -10, 100, 60), "Count", this.Size_Clicked, 1f,true, true,0,200);
            Children.Add(Count);
            SetSpawn = new XG_ButtonLabelBool(new Rectangle(10, 30, 100, 60), "Add Spawn", this.SetSpawn_Clicked, true);
            Children.Add(SetSpawn);
            RemoveSpawn = new XG_ButtonLabelBool(new Rectangle(110, 30, 100, 60), "Del Spawn", this.RemoveSpawn_Clicked, true);
            Children.Add(RemoveSpawn);
            RemoveALL = new XG_Button(new Rectangle(10, 90, 65, 20), "Del All", this.RemoveAllSpawns_Clicked);
            Children.Add(RemoveALL);
            SendGroug = new XG_Button(new Rectangle(100, 90, 65, 20), "Send All", this.SendAllSpawns_Clicked);
            Children.Add(SendGroug);
        }