public Brush(Mod game, Rectangle rect) : base(rect, "Brush") { Game = game; Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; pageRect.Height = 148; Children.Add(new XG_Button(new Rectangle(350, 5, 60, 20), "Clear", this.Clear_Clicked)); Children.Add(new XG_Button(new Rectangle(260, 5, 80, 20), "Set shape", this.Set_Clicked)); XGTabControl tab = new XGTabControl(pageRect); Children.Add(tab); // add the tab control to our child control list freeStyle = new FreeStyle(game, pageRect); tab.Children.Add(freeStyle); copyPaste = new CopyPaste(game, pageRect); tab.Children.Add(copyPaste); }
public ToolWindow(Mod game) : base(new Rectangle(X, Y, 420, 180), true) { Game = game; // Add our window to the Controls to be managed by the Editor_Mod GUI manager XnaGUIManager.Controls.Add(this); // Offset the Tab Control and Tab Page rectangles relative to this Tool Window Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; // but use parent relative coordintates TabControl = new XGTabControl(pageRect); Children.Add(TabControl); // add the tab control to our child control list modify = new Modify(game, pageRect); TabControl.Children.Add(modify); brush = new Brush(game, pageRect); TabControl.Children.Add(brush); npcs = new Npcs(game, pageRect); TabControl.Children.Add(npcs); itemssettings = new ItemsSettings(game, pageRect); TabControl.Children.Add(itemssettings); playerSettings = new PlayerSettings(game, pageRect); TabControl.Children.Add(playerSettings); lazyInventory = new InV(game, pageRect); TabControl.Children.Add(lazyInventory); server = new Server(game, pageRect); TabControl.Children.Add(server); }
public TileSelectionW(Mod game) : base(new Rectangle(X, Y, 250, 180), true) { Game = game; // Add our window to the Controls to be managed by the Editor_Mod GUI manager XnaGUIManager.Controls.Add(this); // Offset the Tab Control and Tab Page rectangles relative to this Tool Window Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; // but use parent relative coordintates TabControl = new XGTabControl(pageRect); Children.Add(TabControl); // add the tab control to our child control list tilesel = new TileSel(game, pageRect); TabControl.Children.Add(tilesel); wallsel = new WallSel(game, pageRect); TabControl.Children.Add(wallsel); }
public Server(Mod game, Rectangle rect) : base(rect, "Tshock") { Game = game; Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; pageRect.Height = 148; label = new XG_Label(new Rectangle(0, this.Rectangle.Height - 30, 200, 20), "Player name"); Children.Add(label ); // leave default Left/VCenter alignment XGTabControl tab = new XGTabControl(pageRect); Children.Add(tab); // add the tab control to our child control list serverCommand1 = new ServerCommand1(game, pageRect); tab.Children.Add(serverCommand1); serverCommand2 = new ServerCommand2(game, pageRect); tab.Children.Add(serverCommand2); serverCommand3 = new ServerCommand3(game, pageRect); tab.Children.Add(serverCommand3); serverCommand4 = new ServerCommand4(game, pageRect); tab.Children.Add(serverCommand4); give = new Give(game, pageRect); tab.Children.Add(give); }
public PlayerSettings(Mod game, Rectangle rect) : base(rect, "Player") { Game = game; Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; pageRect.Height = 148; XGTabControl tab = new XGTabControl(pageRect); Children.Add(tab); // add the tab control to our child control list player_CH = new Player_CH(game, pageRect); tab.Children.Add(player_CH); buffsel = new Buffsel(game, pageRect); tab.Children.Add(buffsel); }
public Npcs(Mod game, Rectangle rect) : base(rect, "Npcs") { Game = game; // Add controls to the tab page Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; pageRect.Height = 148; pageRect.Width = (pageRect.Width / 2) - 1; XGTabControl tab = new XGTabControl(pageRect); Children.Add(tab); // add the tab control to our child control list onclick = new Npconclick(game, pageRect); tab.Children.Add(onclick); spawn = new Npcspawn(game, pageRect); tab.Children.Add(spawn); Tree = new XGTree(new Rectangle(210, 5, 205, 135), TreeItemClicked); Children.Add(Tree); XGTreeItem MobsFamilies = new XGTreeItem(Mod.NpcD.MobsFamilies.Cathegory, Main.inventoryBackTexture); Tree.Items.Add(MobsFamilies); for (int i = 0; i < Mod.NpcD.MobsFamilies.Sections.Length; i++) // add sections { XGTreeItem MobsFamilies_Sections = new XGTreeItem(Mod.NpcD.MobsFamilies.Sections[i], Main.inventoryBackTexture); MobsFamilies.Items.Add(MobsFamilies_Sections); for (int n = 0; n < Mod.NpcD.MobsFamilies.SectionNpcItems[i].Length; n++) // add section items { NPC npc = new NPC(); npc.SetDefaults(Mod.NpcD.MobsFamilies.SectionNpcItems[i][n]); XGTreeItem MobsFamilies_Section_items = new XGTreeItem(Mod.NpcD.MobsFamilies.SectionNpcItems[i][n], Main.npcTexture[npc.type]); MobsFamilies_Sections.Items.Add(MobsFamilies_Section_items); } } XGTreeItem AtoZ = new XGTreeItem(Mod.NpcD.AtoZ.Cathegory, Main.inventoryBackTexture); Tree.Items.Add(AtoZ); for (int i = 0; i < Mod.NpcD.AtoZ.Sections.Length; i++) // add sections { XGTreeItem AtoZ_Sections = new XGTreeItem(Mod.NpcD.AtoZ.Sections[i], Main.inventoryBackTexture); AtoZ.Items.Add(AtoZ_Sections); for (int n = 0; n < Mod.NpcD.AtoZ.SectionNpcItems[i].Length; n++) // add section items { NPC npc = new NPC(); npc.SetDefaults(Mod.NpcD.AtoZ.SectionNpcItems[i][n]); XGTreeItem MobsFamilies_Section_items = new XGTreeItem(Mod.NpcD.AtoZ.SectionNpcItems[i][n], Main.npcTexture[npc.type]); AtoZ_Sections.Items.Add(MobsFamilies_Section_items); } } XGTreeItem ALL = new XGTreeItem("ALL", Main.inventoryBackTexture); Tree.Items.Add(ALL); for (int i = 0; i <Main.npcName.Length; i++) // add sections { NPC npc = new NPC(); npc.SetDefaults(Main.npcName[i]); XGTreeItem alll = new XGTreeItem(npc.name, Main.npcTexture[npc.type]); ALL.Items.Add(alll); } //Tree.ExpandAll(); }
public Modify(Mod game, Rectangle rect) : base(rect, "Modify") { Game = game; Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; pageRect.Height = 148; Children.Add(new XG_Button(new Rectangle(350, 5, 60, 20), "Clear", this.Clear_Clicked)); Children.Add(new XG_Button(new Rectangle(260, 5, 80, 20), "Set shape", this.Set_Clicked)); Children.Add(new XG_Button(new Rectangle(10, 35, 70, 20), "Circle", this.Circle_Clicked)); Children.Add(new XG_Button(new Rectangle(100, 35, 70, 20), "Triagle", this.Triangle_Clicked)); Children.Add(new XG_Button(new Rectangle(200, 35, 70, 20), "Square", this.Square_Clicked)); XGTabControl tab = new XGTabControl(pageRect); Children.Add(tab); // add the tab control to our child control list shapes = new Shapes(game, pageRect); tab.Children.Add(shapes); delete = new Delete(game, pageRect); tab.Children.Add(delete); replace = new Replace(game, pageRect); tab.Children.Add(replace); liquids = new Liquids(game, pageRect); tab.Children.Add(liquids); }
public ItemsSettings(Mod game, Rectangle rect) : base(rect, "Items") { Game = game; Rectangle pageRect = this.Rectangle; // tab pages are the size of the tab control pageRect.X = pageRect.Y = 0; pageRect.Height = 148; XGTabControl tab = new XGTabControl(pageRect); Children.Add(tab); // add the tab control to our child control list tab.Children.Add(new Item_PP(game, pageRect)); tab.Children.Add(new Item_TM(game, pageRect)); tab.Children.Add(new Item_EP(game, pageRect)); tab.Children.Add(new Item_LP(game, pageRect)); tab.Children.Add(new Item_DP(game, pageRect)); tab.Children.Add(new Item_UT(game, pageRect)); tab.Children.Add(new Item_SS(game, pageRect)); tab.Children.Add(new Item_SG(game, pageRect)); }