public override void OnClientAreaChanged(Rectangle oValue, Rectangle nValue) { base.OnClientAreaChanged(oValue, nValue); if (Links == null) { return; } Grid?.Dispose(); Grid = new DXItemGrid { Parent = this, Location = ClientArea.Location, GridSize = new Size(Math.Max(1, (ClientArea.Size.Width) / (DXItemCell.CellWidth - 1)), Math.Max(1, ClientArea.Size.Height / (DXItemCell.CellHeight - 1))), GridType = GridType.Belt, AllowLink = false, }; for (int i = 0; i < Grid.Grid.Length; i++) { new DXLabel { Parent = Grid.Grid[i], Text = ((i + 1) % 10).ToString(), Font = new Font(Config.FontName, CEnvir.FontSize(8F), FontStyle.Italic), IsControl = false, Location = new Point(-2, -1) }; } UpdateLinks(); }
public static void CreateScreenShot() { Bitmap image = CEnvir.Target.GetImage(); using (Graphics graphics = Graphics.FromImage(image)) { string text = $"Date: {CEnvir.Now.ToShortDateString()}{Environment.NewLine}"; text += $"Time: {CEnvir.Now.TimeOfDay:hh\\:mm\\:ss}{Environment.NewLine}"; if (GameScene.Game != null) { text += $"Player: {MapObject.User.Name}{Environment.NewLine}"; } using (Font font = new Font(Config.FontName, CEnvir.FontSize(8F))) { graphics.DrawString(text, font, Brushes.Black, 3, 33); graphics.DrawString(text, font, Brushes.Black, 4, 32); graphics.DrawString(text, font, Brushes.Black, 5, 33); graphics.DrawString(text, font, Brushes.Black, 4, 34); graphics.DrawString(text, font, Brushes.White, 4, 33); } } string path = Path.Combine(Application.StartupPath, @"Screenshots\"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } int count = Directory.GetFiles(path, "*.png").Length; string fileName = $"Image {count}.png"; image.Save(Path.Combine(path, fileName), ImageFormat.Png); image.Dispose(); if (GameScene.Game != null) { GameScene.Game.ReceiveChat("Screenshot Saved " + fileName, MessageType.System); } }
public MainPanel() { LibraryFile = LibraryFile.GameInter; Index = 50; ExperienceBar = new DXImageControl { Parent = this, LibraryFile = LibraryFile.GameInter, Index = 51, }; ExperienceBar.Location = new Point((Size.Width - ExperienceBar.Size.Width) / 2 + 1, 2 + 1); ExperienceBar.BeforeDraw += (o, e) => { if (ExperienceBar.Library == null) { return; } if (MapObject.User.Level >= Globals.ExperienceList.Count) { return; } decimal MaxExperience = Globals.ExperienceList[MapObject.User.Level]; if (MaxExperience == 0) { return; } //Get percent. MirImage image = ExperienceBar.Library.CreateImage(56, ImageType.Image); if (image == null) { return; } int x = (ExperienceBar.Size.Width - image.Width) / 2; int y = (ExperienceBar.Size.Height - image.Height) / 2; float percent = (float)Math.Min(1, Math.Max(0, MapObject.User.Experience / MaxExperience)); if (percent == 0) { return; } PresentTexture(image.Image, this, new Rectangle(ExperienceBar.DisplayArea.X + x, ExperienceBar.DisplayArea.Y + y - 1, (int)(image.Width * percent), image.Height), Color.White, ExperienceBar); }; DXControl HealthBar = new DXControl { Parent = this, Location = new Point(35, 22), Size = ExperienceBar.Library.GetSize(52), }; HealthBar.BeforeDraw += (o, e) => { if (ExperienceBar.Library == null) { return; } if (MapObject.User.Stats[Stat.Health] == 0) { return; } float percent = Math.Min(1, Math.Max(0, MapObject.User.CurrentHP / (float)MapObject.User.Stats[Stat.Health])); if (percent == 0) { return; } MirImage image = ExperienceBar.Library.CreateImage(52, ImageType.Image); if (image == null) { return; } PresentTexture(image.Image, this, new Rectangle(HealthBar.DisplayArea.X, HealthBar.DisplayArea.Y, (int)(image.Width * percent), image.Height), Color.White, HealthBar); }; DXControl ManaBar = new DXControl { Parent = this, Location = new Point(35, 36), Size = ExperienceBar.Library.GetSize(52), }; ManaBar.BeforeDraw += (o, e) => { if (ExperienceBar.Library == null) { return; } if (MapObject.User.Stats[Stat.Mana] == 0) { return; } float percent = Math.Min(1, Math.Max(0, MapObject.User.CurrentMP / (float)MapObject.User.Stats[Stat.Mana])); if (percent == 0) { return; } MirImage image = ExperienceBar.Library.CreateImage(54, ImageType.Image); if (image == null) { return; } PresentTexture(image.Image, this, new Rectangle(ManaBar.DisplayArea.X, ManaBar.DisplayArea.Y, (int)(image.Width * percent), image.Height), Color.White, ManaBar); }; DXImageControl OtherBar = new DXImageControl { Parent = this, Location = new Point(35, 50), LibraryFile = LibraryFile.GameInter, Index = 58, Visible = false, }; DXButton CharacterButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 82, Parent = this, Location = new Point(650, 23), Hint = "角色 [Q]" }; CharacterButton.MouseClick += (o, e) => { GameScene.Game.CharacterBox.Visible = !GameScene.Game.CharacterBox.Visible; }; DXButton InventoryButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 87, Parent = this, Location = new Point(689, 23), Hint = "背包 [W]\n" + "宠物背包 [U]" }; InventoryButton.MouseClick += (o, e) => GameScene.Game.InventoryBox.Visible = !GameScene.Game.InventoryBox.Visible; DXButton SpellButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 92, Parent = this, Location = new Point(728, 23), Hint = "技能 [E]" }; SpellButton.MouseClick += (o, e) => GameScene.Game.MagicBox.Visible = !GameScene.Game.MagicBox.Visible; DXButton QuestButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 112, Parent = this, Location = new Point(767, 23), Hint = "任务 [J]" }; QuestButton.MouseClick += (o, e) => GameScene.Game.QuestBox.Visible = !GameScene.Game.QuestBox.Visible; DXButton MailButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 97, Parent = this, Location = new Point(806, 23), Hint = "邮件 [,]" }; MailButton.MouseClick += (o, e) => GameScene.Game.MailBox.Visible = !GameScene.Game.MailBox.Visible; NewMailIcon = new DXImageControl { LibraryFile = LibraryFile.GameInter, Index = 240, Parent = MailButton, IsControl = false, Location = new Point(2, 2), Visible = false, }; AvailableQuestIcon = new DXImageControl { LibraryFile = LibraryFile.GameInter, Index = 240, Parent = QuestButton, IsControl = false, Location = new Point(2, 2), Visible = false, }; AvailableQuestIcon.VisibleChanged += (o, e) => { if (AvailableQuestIcon.Visible) { CompletedQuestIcon.Location = new Point(2, QuestButton.Size.Height - CompletedQuestIcon.Size.Height); } else { CompletedQuestIcon.Location = new Point(2, 2); } }; CompletedQuestIcon = new DXImageControl { LibraryFile = LibraryFile.GameInter, Index = 241, Parent = QuestButton, IsControl = false, Location = new Point(2, 2), Visible = false, }; DXButton BeltButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 107, Parent = this, Location = new Point(845, 23), Hint = "快捷栏 [Z]" }; BeltButton.MouseClick += (o, e) => GameScene.Game.BeltBox.Visible = !GameScene.Game.BeltBox.Visible; DXButton GroupButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 102, Parent = this, Location = new Point(884, 23), Hint = "组队 [P]" }; GroupButton.MouseClick += (o, e) => GameScene.Game.GroupBox.Visible = !GameScene.Game.GroupBox.Visible; DXButton ConfigButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 117, Parent = this, Location = new Point(923, 23), Hint = "设置 [O]" }; ConfigButton.MouseClick += (o, e) => GameScene.Game.ConfigBox.Visible = !GameScene.Game.ConfigBox.Visible; DXButton CashShopButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 122, Parent = this, Location = new Point(972, 16), Hint = "元宝商铺 [Y]" }; CashShopButton.MouseClick += (o, e) => { if (GameScene.Game.MarketPlaceBox.StoreTab.IsVisible) { GameScene.Game.MarketPlaceBox.Visible = false; } else { GameScene.Game.MarketPlaceBox.Visible = true; GameScene.Game.MarketPlaceBox.StoreTab.TabButton.InvokeMouseClick(); } }; DXLabel label = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "职业", Hint = "职业", }; label.Location = new Point(300 - label.Size.Width, 20); label = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "等级", Hint = "等级", }; label.Location = new Point(300 - label.Size.Width, 40); label = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "防御", }; label.Location = new Point(385 - label.Size.Width, 20); label = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "魔防", }; label.Location = new Point(470 - label.Size.Width, 20); label = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "攻击", }; label.Location = new Point(385 - label.Size.Width, 40); DXLabel MCLabelLabel = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "魔法", }; MCLabelLabel.Location = new Point(470 - MCLabelLabel.Size.Width, 40); DXLabel SCLabelLabel = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "道术", }; SCLabelLabel.Location = new Point(470 - SCLabelLabel.Size.Width, 40); label = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "准确", Hint = "准确", }; label.Location = new Point(567 - label.Size.Width, 20); label = new DXLabel { Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(9F), FontStyle.Bold), Text = "敏捷", Hint = "敏捷", }; label.Location = new Point(567 - label.Size.Width, 40); ClassLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(300, 20), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; LevelLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(300, 40), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; ACLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(385, 20), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; MRLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(470, 20), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; DCLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(385, 40), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; MCLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(470, 40), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; MCLabel.VisibleChanged += (o, e) => MCLabelLabel.Visible = MCLabel.Visible; SCLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(470, 40), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; SCLabel.VisibleChanged += (o, e) => SCLabelLabel.Visible = SCLabel.Visible; AccuracyLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(567, 20), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; AgilityLabel = new DXLabel { AutoSize = false, Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F)), Location = new Point(567, 40), Size = new Size(60, 16), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; HealthLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; HealthLabel.SizeChanged += (o, e) => { HealthLabel.Location = new Point(HealthBar.Location.X + (HealthBar.Size.Width - HealthLabel.Size.Width) / 2, HealthBar.Location.Y + (HealthBar.Size.Height - HealthLabel.Size.Height) / 2); }; ManaLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; ManaLabel.SizeChanged += (o, e) => { ManaLabel.Location = new Point(ManaBar.Location.X + (ManaBar.Size.Width - ManaLabel.Size.Width) / 2, ManaBar.Location.Y + (ManaBar.Size.Height - ManaLabel.Size.Height) / 2); }; ExperienceLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; ExperienceLabel.SizeChanged += (o, e) => { ExperienceLabel.Location = new Point(ExperienceBar.Location.X + (ExperienceBar.Size.Width - ExperienceLabel.Size.Width) / 2, ExperienceBar.Location.Y + (ExperienceBar.Size.Height - ExperienceLabel.Size.Height) / 2); }; AttackModeLabel = new DXLabel { Parent = this, ForeColour = Color.Cyan, Outline = true, OutlineColour = Color.Black, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; AttackModeLabel.SizeChanged += (o, e) => { AttackModeLabel.Location = new Point(OtherBar.Location.X, OtherBar.Location.Y + (OtherBar.Size.Height - AttackModeLabel.Size.Height) / 2 - 2); }; PetModeLabel = new DXLabel { Parent = this, ForeColour = Color.Cyan, Outline = true, OutlineColour = Color.Black, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; PetModeLabel.SizeChanged += (o, e) => { PetModeLabel.Location = new Point(OtherBar.Location.X + OtherBar.Size.Width - PetModeLabel.Size.Width, OtherBar.Location.Y + (OtherBar.Size.Height - PetModeLabel.Size.Height) / 2 - 2); }; }
public CompanionOptionsDialog() { TitleLabel.Text = "Companion Options"; SetClientSize(new Size(182, 341)); Movable = false; TypeFilterLabel = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Item Type Filter:", }; TypeFilterLabel.Location = new Point(ClientArea.Left + 3, ClientArea.Y + 1); CheckBoxRightPoint = new Point(TypeFilterLabel.Size.Width, 0); int i = 22; int gap = 16; GoldCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Gold:" }, Visible = true }; GoldCheckBox.Location = new Point(CheckBoxRightPoint.X - GoldCheckBox.Size.Width, ClientArea.Y + i); GoldCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Gold }); }; i += gap; WeaponCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Weapon:" }, Visible = true }; WeaponCheckBox.Location = new Point(CheckBoxRightPoint.X - WeaponCheckBox.Size.Width, ClientArea.Y + i); WeaponCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Weapon }); }; i += gap; ArmourCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Armour:" }, Visible = true }; ArmourCheckBox.Location = new Point(CheckBoxRightPoint.X - ArmourCheckBox.Size.Width, ClientArea.Y + i); ArmourCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Armour }); }; i += gap; HelmetCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Helmet:" }, Visible = true }; HelmetCheckBox.Location = new Point(CheckBoxRightPoint.X - HelmetCheckBox.Size.Width, ClientArea.Y + i); HelmetCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Helmet }); }; i += gap; ShieldCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Shield:" }, Visible = true }; ShieldCheckBox.Location = new Point(CheckBoxRightPoint.X - ShieldCheckBox.Size.Width, ClientArea.Y + i); ShieldCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Shield }); }; i += gap; NecklaceCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Necklace:" }, Visible = true }; NecklaceCheckBox.Location = new Point(CheckBoxRightPoint.X - NecklaceCheckBox.Size.Width, ClientArea.Y + i); NecklaceCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Necklace }); }; i += gap; BraceletCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Bracelet:" }, Visible = true }; BraceletCheckBox.Location = new Point(CheckBoxRightPoint.X - BraceletCheckBox.Size.Width, ClientArea.Y + i); BraceletCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Bracelet }); }; i += gap; RingCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Ring:" }, Visible = true }; RingCheckBox.Location = new Point(CheckBoxRightPoint.X - RingCheckBox.Size.Width, ClientArea.Y + i); RingCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Ring }); }; i += gap; ShoesCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Shoes:" }, Visible = true }; ShoesCheckBox.Location = new Point(CheckBoxRightPoint.X - ShoesCheckBox.Size.Width, ClientArea.Y + i); ShoesCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Shoes }); }; i += gap; EmblemsCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Emblems:" }, Visible = true }; EmblemsCheckBox.Location = new Point(CheckBoxRightPoint.X - EmblemsCheckBox.Size.Width, ClientArea.Y + i); EmblemsCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Emblem }); }; i += gap; WingsCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Wings:" }, Visible = true }; WingsCheckBox.Location = new Point(CheckBoxRightPoint.X - WingsCheckBox.Size.Width, ClientArea.Y + i); WingsCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Wings }); }; i += gap; BookLabel = new DXLabel { Parent = this, ForeColour = Color.White, IsControl = false, Text = "Book:", }; BookLabel.Location = new Point(CheckBoxRightPoint.X - BookLabel.Size.Width - 16, ClientArea.Y + i); BookWarriorCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "" }, Hint = "Warrior", Visible = true }; BookWarriorCheckBox.Location = new Point(CheckBoxRightPoint.X - 16, ClientArea.Y + i); BookWarriorCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Book, Class = RequiredClass.Warrior }); }; BookWizardCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "" }, Hint = "Wizard", Visible = true }; BookWizardCheckBox.Location = new Point(CheckBoxRightPoint.X + BookWarriorCheckBox.Size.Width - 16, ClientArea.Y + i); BookWizardCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Book, Class = RequiredClass.Wizard }); }; BookTaoistCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "" }, Hint = "Taoist", Visible = true }; BookTaoistCheckBox.Location = new Point(CheckBoxRightPoint.X + BookWarriorCheckBox.Size.Width + BookWizardCheckBox.Size.Width - 16, ClientArea.Y + i); BookTaoistCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Book, Class = RequiredClass.Taoist }); }; BookAssassinCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "" }, Hint = "Assassin", Visible = true }; BookAssassinCheckBox.Location = new Point(CheckBoxRightPoint.X + BookWarriorCheckBox.Size.Width + BookWizardCheckBox.Size.Width + BookTaoistCheckBox.Size.Width - 16, ClientArea.Y + i); BookAssassinCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Book, Class = RequiredClass.Assassin }); }; i += gap; PotionCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Potion:" }, Visible = true }; PotionCheckBox.Location = new Point(CheckBoxRightPoint.X - PotionCheckBox.Size.Width, ClientArea.Y + i); PotionCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Consumable }); }; i += gap; OreCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Ore:" }, Visible = true }; OreCheckBox.Location = new Point(CheckBoxRightPoint.X - OreCheckBox.Size.Width, ClientArea.Y + i); OreCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupToggle { Type = ItemType.Ore }); }; i += gap; i += gap; GradeFilterLabel = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Item Grade Filter:", }; GradeFilterLabel.Location = new Point(ClientArea.Left + 3, ClientArea.Y + i); CheckBoxRightPoint = new Point(GradeFilterLabel.Size.Width, 0); i += 22; CommonCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Common:" }, Visible = true }; CommonCheckBox.Location = new Point(CheckBoxRightPoint.X - CommonCheckBox.Size.Width, ClientArea.Y + i); CommonCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupGradeToggle { Grade = Rarity.Common }); }; i += gap; SuperiorCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Superior:" }, Visible = true }; SuperiorCheckBox.Location = new Point(CheckBoxRightPoint.X - SuperiorCheckBox.Size.Width, ClientArea.Y + i); SuperiorCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupGradeToggle { Grade = Rarity.Superior }); }; i += gap; EliteCheckBox = new DXCheckBox { Parent = this, ForeColour = Color.White, Label = { Text = "Elite:" }, Visible = true }; EliteCheckBox.Location = new Point(CheckBoxRightPoint.X - EliteCheckBox.Size.Width, ClientArea.Y + i); EliteCheckBox.MouseClick += (o, e) => { CEnvir.Enqueue(new C.CompanionPickupGradeToggle { Grade = Rarity.Elite }); }; i += gap; }
public InventoryDialog() { LibraryFile = LibraryFile.Interface; Index = 130; Movable = true; CloseButton = new DXButton { Parent = this, Index = 15, LibraryFile = LibraryFile.Interface, }; CloseButton.Location = new Point(DisplayArea.Width - CloseButton.Size.Width - 5, 5); CloseButton.MouseClick += (o, e) => Visible = false; TitleLabel = new DXLabel { Text = "Inventory", Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), Outline = true, OutlineColour = Color.Black, IsControl = false, }; TitleLabel.Location = new Point((DisplayArea.Width - TitleLabel.Size.Width) / 2, 8); Grid = new DXItemGrid { GridSize = new Size(6, 8), Parent = this, ItemGrid = GameScene.Game.Inventory, GridType = GridType.Inventory, Location = new Point(20, 39), GridPadding = 1, BackColour = Color.Empty, Border = false }; CEnvir.LibraryList.TryGetValue(LibraryFile.GameInter, out MirLibrary library); DXControl WeightBar = new DXControl { Parent = this, Location = new Point(53, 355), Size = library.GetSize(360), }; WeightBar.BeforeDraw += (o, e) => { if (library == null) { return; } if (MapObject.User.Stats[Stat.BagWeight] == 0) { return; } float percent = Math.Min(1, Math.Max(0, MapObject.User.BagWeight / (float)MapObject.User.Stats[Stat.BagWeight])); if (percent == 0) { return; } MirImage image = library.CreateImage(360, ImageType.Image); if (image == null) { return; } PresentTexture(image.Image, this, new Rectangle(WeightBar.DisplayArea.X, WeightBar.DisplayArea.Y, (int)(image.Width * percent), image.Height), Color.White, WeightBar); }; WeightLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter }; WeightLabel.SizeChanged += (o, e) => { WeightLabel.Location = new Point(WeightBar.Location.X + (WeightBar.Size.Width - WeightLabel.Size.Width) / 2, WeightBar.Location.Y - 1 + (WeightBar.Size.Height - WeightLabel.Size.Height) / 2); }; GoldTitle = new DXLabel { AutoSize = false, ForeColour = Color.Goldenrod, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.Left, Parent = this, Location = new Point(55, 381), Font = new Font(Config.FontName, CEnvir.FontSize(8F), FontStyle.Bold), Text = "Gold", Size = new Size(97, 20) }; GoldLabel = new DXLabel { AutoSize = false, ForeColour = Color.White, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.Right, Parent = this, Location = new Point(80, 381), Text = "0", Size = new Size(97, 20), Sound = SoundIndex.GoldPickUp }; GoldLabel.MouseClick += GoldLabel_MouseClick; GameGoldTitle = new DXLabel { AutoSize = false, ForeColour = Color.DarkOrange, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.Left, Parent = this, Location = new Point(55, 400), Font = new Font(Config.FontName, CEnvir.FontSize(8F), FontStyle.Bold), Text = "GG", Size = new Size(97, 20) }; GameGoldLabel = new DXLabel { AutoSize = false, ForeColour = Color.White, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.Right, Parent = this, Location = new Point(80, 400), Text = "0", Size = new Size(97, 20) }; SortButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 364, Parent = this, Location = new Point(180, 384), Hint = "Sort", Enabled = false }; TrashButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 358, Parent = this, Location = new Point(218, 384), Hint = "Trash", Enabled = false }; CurrencyLabel = new DXLabel { Parent = this, Location = new Point(8, 380), Hint = "Wallet [Ctrl + C]", Size = new Size(45, 40), Sound = SoundIndex.GoldPickUp }; CurrencyLabel.MouseClick += CurrencyLabel_MouseClick; }
public CompanionFilterDialog() { CloseButton.Visible = false; TitleLabel.Text = "Filter Companion Pick"; SetClientSize(new Size(350, 341)); DXLabel label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Class", }; label.Location = new Point(20, 40); DrawClassFilter(); label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Rarity Type", }; label.Location = new Point(20, 100); DrawRarityFilter(); label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Item Type", }; label.Location = new Point(20, 160); DrawItemTypeFilter(); DXButton filterButton = new DXButton { Parent = this, Label = { Text = "Save settings", }, ButtonType = ButtonType.SmallButton, Size = new Size(80, SmallButtonHeight) }; filterButton.Location = new Point(Size.Width / 2 - filterButton.Size.Width / 2, Size.Height - 30); filterButton.MouseClick += (o, e) => { List <MirClass> fClass = GetCheckedItemsClass(); List <Rarity> fRarity = GetCheckedItemsRarity(); List <ItemType> fType = GetCheckedItemsType(); GameScene.Game.User.FiltersClass = String.Join(",", fClass); GameScene.Game.User.FiltersRarity = String.Join(",", fRarity); GameScene.Game.User.FiltersItemType = String.Join(",", fType); CEnvir.Enqueue(new C.SendCompanionFilters { FilterClass = GetCheckedItemsClass(), FilterRarity = GetCheckedItemsRarity(), FilterItemType = GetCheckedItemsType() }); }; }
public CompanionDialog() { TitleLabel.Text = "宠物"; SetClientSize(new Size(355, 590)); // feature 拾取过滤 物品显示过滤 HasTitle = true; CompanionTabControl = new DXTabControl { Parent = this, Location = ClientArea.Location, Size = ClientArea.Size, }; CompanionBagTab = new DXTab { Parent = CompanionTabControl, Border = true, TabButton = { Label = { Text = "宠物背包" } }, }; PickUpFilterTab = new DXTab { Parent = CompanionTabControl, Border = true, TabButton = { Label = { Text = "拾取过滤" } }, }; ItemNameFilterTab = new DXTab { Parent = CompanionTabControl, Border = true, TabButton = { Label = { Text = "显示过滤" } }, }; CompanionTabControl.SelectedTab = CompanionBagTab; DXControl filterPanel = new DXControl { Parent = PickUpFilterTab, Size = new Size(PickUpFilterTab.Size.Width, 26), Location = new Point(0, 0), Border = true, BorderColour = Color.FromArgb(198, 166, 99) }; DXLabel PickUpFilterItemNameLabel = new DXLabel { Parent = filterPanel, Location = new Point(5, 5), Text = "名字:", }; PickUpFilterItemNameBox = new DXTextBox { Parent = filterPanel, Size = new Size(90, 20), Location = new Point(PickUpFilterItemNameLabel.Location.X + PickUpFilterItemNameLabel.Size.Width + 5, PickUpFilterItemNameLabel.Location.Y), }; PickUpFilterItemNameBox.TextBox.KeyPress += TextBox_KeyPress; PickUpFilterItemTypelabel = new DXLabel { Parent = filterPanel, Location = new Point(PickUpFilterItemNameBox.Location.X + PickUpFilterItemNameBox.Size.Width + 10, 5), Text = "物品:", }; PickUpFilterItemTypeBox = new DXComboBox { Parent = filterPanel, Location = new Point(PickUpFilterItemTypelabel.Location.X + PickUpFilterItemTypelabel.Size.Width + 5, PickUpFilterItemTypelabel.Location.Y), Size = new Size(72, DXComboBox.DefaultNormalHeight), DropDownHeight = 198 }; new DXListBoxItem { Parent = PickUpFilterItemTypeBox.ListBox, Label = { Text = "所有" }, Item = null }; Type itemType = typeof(ItemType); for (ItemType i = ItemType.Nothing; i <= ItemType.ItemPart; i++) { MemberInfo[] infos = itemType.GetMember(i.ToString()); DescriptionAttribute description = infos[0].GetCustomAttribute <DescriptionAttribute>(); new DXListBoxItem { Parent = PickUpFilterItemTypeBox.ListBox, Label = { Text = description?.Description ?? i.ToString() }, Item = i }; } PickUpFilterItemTypeBox.ListBox.SelectItem(null); PickUpFilterSearchButton = new DXButton { Size = new Size(80, SmallButtonHeight), Location = new Point(PickUpFilterItemTypeBox.Location.X + PickUpFilterItemTypeBox.Size.Width + 15, PickUpFilterItemTypelabel.Location.Y - 1), Parent = filterPanel, ButtonType = ButtonType.SmallButton, Label = { Text = "搜索" } }; PickUpFilterSearchButton.MouseClick += (o, e) => Search(); PickUpFilterRow = new PickUpFilterRow[9]; PickupFilterSearchScrollBar = new DXVScrollBar { Parent = PickUpFilterTab, Location = new Point(PickUpFilterTab.Size.Width - 14, filterPanel.Size.Height + 5), Size = new Size(14, PickUpFilterTab.Size.Height - 5 - filterPanel.Size.Height), VisibleSize = PickUpFilterRow.Length, Change = 3, }; PickupFilterSearchScrollBar.ValueChanged += SearchScrollBar_ValueChanged; for (int i = 0; i < PickUpFilterRow.Length; i++) { int index = i; PickUpFilterRow[index] = new PickUpFilterRow { Parent = PickUpFilterTab, Location = new Point(0, filterPanel.Size.Height + 5 + i * 58), }; // SearchRows[index].MouseClick += (o, e) => { SelectedRow = SearchRows[index]; }; PickUpFilterRow[index].MouseWheel += PickupFilterSearchScrollBar.DoMouseWheel; } // feature end //CompanionDisplayPoint = new Point(ClientArea.X + 60, ClientArea.Y + 50); CompanionDisplayPoint = new Point(60, 120); InventoryGrid = new DXItemGrid { GridSize = new Size(10, 10), Parent = CompanionBagTab, GridType = GridType.CompanionInventory, Location = new Point(0, 200), }; EquipmentGrid = new DXItemCell[Globals.CompanionEquipmentSize]; DXItemCell cell; EquipmentGrid[(int)CompanionSlot.Bag] = cell = new DXItemCell { Location = new Point(196, 5), Parent = CompanionBagTab, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Bag, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 99); EquipmentGrid[(int)CompanionSlot.Head] = cell = new DXItemCell { Location = new Point(236, 5), Parent = CompanionBagTab, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Head, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 100); EquipmentGrid[(int)CompanionSlot.Back] = cell = new DXItemCell { Location = new Point(276, 5), Parent = CompanionBagTab, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Back, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 101); EquipmentGrid[(int)CompanionSlot.Food] = cell = new DXItemCell { Location = new Point(316, 5), Parent = CompanionBagTab, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Food, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 102); DXCheckBox PickUpCheckBox = new DXCheckBox { Parent = CompanionBagTab, Label = { Text = "拾取物品:" }, Visible = false }; //PickUpCheckBox.Location = new Point(ClientArea.Right - PickUpCheckBox.Size.Width +3, ClientArea.Y + 45); PickUpCheckBox.Location = new Point(60, 90); /* * new DXLabel * { * AutoSize = false, * Parent = this, * Outline = true, * Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), * ForeColour = Color.FromArgb(198, 166, 99), * OutlineColour = Color.Black, * IsControl = false, * Text = "Abilities", * Location = new Point(ClientArea.X + 196, CompanionDisplayPoint.Y - 20), * Size = new Size(156, 20), * DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, * }; */ DXLabel label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 3", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y - 70); Level3Label = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y - 67), Text = "不可用" }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 5", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y - 50); Level5Label = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y - 47), Text = "不可用" }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 7", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y - 30); Level7Label = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y - 27), Text = "不可用" }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 10", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y - 10); Level10Label = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y - 7), Text = "不可用" }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 11", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 10); Level11Label = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 13), Text = "不可用" }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 13", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 30); Level13Label = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 33), Text = "不可用" }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 15", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 50); Level15Label = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 53), Text = "不可用" }; NameLabel = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y - 27) }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "名字", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y - 30); LevelLabel = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y - 7) }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "等级", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y - 10); ExperienceLabel = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 13) }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "经验", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 10); HungerLabel = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 33) }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "饥饿度", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 30); WeightLabel = new DXLabel { Parent = CompanionBagTab, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 53) }; label = new DXLabel { Parent = CompanionBagTab, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "重量", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 50); }
public TradeDialog() { TitleLabel.Text = "交易窗口"; Location = new Point(40, 40); UserGrid = new DXItemGrid { GridSize = new Size(5, 3), Parent = this, Location = new Point(ClientArea.X + 5, ClientArea.Y + 25), GridType = GridType.TradeUser, Linked = true, }; foreach (DXItemCell cell in UserGrid.Grid) { cell.LinkChanged += (o, e) => { cell.ReadOnly = cell.Item != null; if (cell.Item == null || GameScene.Game.Observer) { return; } CEnvir.Enqueue(new C.TradeAddItem { Cell = new CellLinkInfo { Slot = cell.Link.Slot, Count = cell.LinkedCount, GridType = cell.Link.GridType } }); }; } PlayerGrid = new DXItemGrid { GridSize = new Size(5, 3), Parent = this, Location = new Point(UserGrid.Location.X + UserGrid.Size.Width + 20, ClientArea.Y + 25), ItemGrid = PlayerItems = new ClientUserItem[15], GridType = GridType.TradePlayer, ReadOnly = true, }; UserLabel = new DXLabel { Text = "用户", Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), Outline = true, OutlineColour = Color.Black, IsControl = false, }; UserLabel.SizeChanged += (o, e) => UserLabel.Location = new Point(UserGrid.Location.X + (UserGrid.Size.Width - UserLabel.Size.Width) / 2, ClientArea.Y); UserLabel.Location = new Point(UserGrid.Location.X + (UserGrid.Size.Width - UserLabel.Size.Width) / 2, ClientArea.Y); PlayerLabel = new DXLabel { Text = "玩家", Parent = this, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), Outline = true, OutlineColour = Color.Black, IsControl = false, }; PlayerLabel.SizeChanged += (o, e) => PlayerLabel.Location = new Point(PlayerGrid.Location.X + (PlayerGrid.Size.Width - PlayerLabel.Size.Width) / 2, ClientArea.Y); PlayerLabel.Location = new Point(PlayerGrid.Location.X + (PlayerGrid.Size.Width - PlayerLabel.Size.Width) / 2, ClientArea.Y); UserGoldLabel = new DXLabel { AutoSize = false, Border = true, BorderColour = Color.FromArgb(99, 83, 50), ForeColour = Color.White, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, Location = new Point(UserGrid.Location.X + 60, UserGrid.Location.Y + UserGrid.Size.Height + 5), Text = "0", Size = new Size(UserGrid.Size.Width - 61, 20), Sound = SoundIndex.GoldPickUp }; UserGoldLabel.MouseClick += UserGoldLabel_MouseClick; new DXLabel { AutoSize = false, Border = true, BorderColour = Color.FromArgb(99, 83, 50), ForeColour = Color.White, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, Location = new Point(UserGrid.Location.X + 1, UserGrid.Location.Y + UserGrid.Size.Height + 5), Text = "金币", Size = new Size(58, 20), IsControl = false, }; PlayerGoldLabel = new DXLabel { AutoSize = false, Border = true, BorderColour = Color.FromArgb(99, 83, 50), ForeColour = Color.White, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, Location = new Point(PlayerGrid.Location.X + 60, UserGrid.Location.Y + UserGrid.Size.Height + 5), Text = "0", Size = new Size(UserGrid.Size.Width - 61, 20), Sound = SoundIndex.GoldPickUp }; new DXLabel { AutoSize = false, Border = true, BorderColour = Color.FromArgb(99, 83, 50), ForeColour = Color.White, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, Location = new Point(PlayerGrid.Location.X + 1, UserGrid.Location.Y + UserGrid.Size.Height + 5), Text = "金币", Size = new Size(58, 20), IsControl = false, }; ConfirmButton = new DXButton { Parent = this, Location = new Point(UserGrid.Location.X + UserGrid.Size.Width - 80, UserGoldLabel.Location.Y + 25), Label = { Text = "确认" }, ButtonType = ButtonType.SmallButton, Size = new Size(80, SmallButtonHeight), }; ConfirmButton.MouseClick += (o, e) => { if (GameScene.Game.Observer) { return; } ConfirmButton.Enabled = false; CEnvir.Enqueue(new C.TradeConfirm()); }; SetClientSize(new Size(PlayerGrid.Size.Width * 2 + 30, PlayerGrid.Size.Height + UserLabel.Size.Height + 15 + UserGoldLabel.Size.Height + ConfirmButton.Size.Height)); }
public CompanionDialog() { TitleLabel.Text = "宠物"; SetClientSize(new Size(352, 560)); CompanionDisplayPoint = new Point(ClientArea.X + 60, ClientArea.Y + 50); InventoryGrid = new DXItemGrid { GridSize = new Size(10, 10), Parent = this, GridType = GridType.CompanionInventory, Location = new Point(ClientArea.X, ClientArea.Y + 200), }; EquipmentGrid = new DXItemCell[Globals.CompanionEquipmentSize]; DXItemCell cell; EquipmentGrid[(int)CompanionSlot.Bag] = cell = new DXItemCell { Location = new Point(ClientArea.X + 196, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Bag, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 99); EquipmentGrid[(int)CompanionSlot.Head] = cell = new DXItemCell { Location = new Point(ClientArea.X + 236, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Head, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 100); EquipmentGrid[(int)CompanionSlot.Back] = cell = new DXItemCell { Location = new Point(ClientArea.X + 276, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Back, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 101); EquipmentGrid[(int)CompanionSlot.Food] = cell = new DXItemCell { Location = new Point(ClientArea.X + 316, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Food, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 102); DXCheckBox PickUpCheckBox = new DXCheckBox { Parent = this, Label = { Text = "拾取物品:" }, Visible = false }; PickUpCheckBox.Location = new Point(ClientArea.Right - PickUpCheckBox.Size.Width + 3, ClientArea.Y + 45); /* * new DXLabel * { * AutoSize = false, * Parent = this, * Outline = true, * Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), * ForeColour = Color.FromArgb(198, 166, 99), * OutlineColour = Color.Black, * IsControl = false, * Text = "Abilities", * Location = new Point(ClientArea.X + 196, CompanionDisplayPoint.Y - 20), * Size = new Size(156, 20), * DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, * }; */ DXLabel label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 3", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y); Level3Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 3), Text = "不可用" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 5", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 20); Level5Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 23), Text = "不可用" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 7", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 40); Level7Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 43), Text = "不可用" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 10", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 60); Level10Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 63), Text = "不可用" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 11", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 80); Level11Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 83), Text = "不可用" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 13", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 100); Level13Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 103), Text = "不可用" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 15", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 120); Level15Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 123), Text = "不可用" }; NameLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 43) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "名字", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 40); LevelLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 63) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "等级", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 60); ExperienceLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 83) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "经验", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 80); HungerLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 103) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "饥饿度", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 100); WeightLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 123) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "重量", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 120); }
public CompanionDialog() { TitleLabel.Text = "Companion"; SetClientSize(new Size(352, 441)); CompanionDisplayPoint = new Point(ClientArea.X + 60, ClientArea.Y + 50); InventoryGrid = new DXItemGrid { GridSize = new Size(10, 4), Parent = this, GridType = GridType.CompanionInventory, Location = new Point(ClientArea.X, ClientArea.Y + 300), }; EquipmentGrid = new DXItemCell[Globals.CompanionEquipmentSize]; DXItemCell cell; EquipmentGrid[(int)CompanionSlot.Bag] = cell = new DXItemCell { Location = new Point(ClientArea.X + 196, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Bag, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 99); EquipmentGrid[(int)CompanionSlot.Head] = cell = new DXItemCell { Location = new Point(ClientArea.X + 236, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Head, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 100); EquipmentGrid[(int)CompanionSlot.Back] = cell = new DXItemCell { Location = new Point(ClientArea.X + 276, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Back, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 101); EquipmentGrid[(int)CompanionSlot.Food] = cell = new DXItemCell { Location = new Point(ClientArea.X + 316, ClientArea.Y + 5), Parent = this, FixedBorder = true, Border = true, Slot = (int)CompanionSlot.Food, GridType = GridType.CompanionEquipment, }; cell.BeforeDraw += (o, e) => Draw((DXItemCell)o, 102); DXCheckBox PickUpCheckBox = new DXCheckBox { Parent = this, Label = { Text = "Pick up items:" }, Visible = false }; PickUpCheckBox.Location = new Point(ClientArea.Right - PickUpCheckBox.Size.Width + 3, ClientArea.Y + 45); DXButton ConfigButton = new DXButton { LibraryFile = LibraryFile.GameInter, Index = 116, Parent = this, }; ConfigButton.Location = new Point(ClientArea.X + 2, ClientArea.Y + 5); ConfigButton.MouseClick += (o, e) => GameScene.Game.CompanionOptionsBox.Visible = !GameScene.Game.CompanionOptionsBox.Visible; /* * new DXLabel * { * AutoSize = false, * Parent = this, * Outline = true, * Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), * ForeColour = Color.FromArgb(198, 166, 99), * OutlineColour = Color.Black, * IsControl = false, * Text = "Abilities", * Location = new Point(ClientArea.X + 196, CompanionDisplayPoint.Y - 20), * Size = new Size(156, 20), * DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, * }; */ DXLabel label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 3", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y); Level3Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 3), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 5", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 20); Level5Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 23), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 7", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 40); Level7Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 43), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 10", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 60); Level10Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 63), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 11", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 80); Level11Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 83), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 13", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 100); Level13Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 103), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 15", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 120); Level15Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 123), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 17", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 140); Level17Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 143), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 19", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 160); Level19Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 163), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 21", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 180); Level21Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 183), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 23", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 200); Level23Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 203), Text = "Not Available" }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level 25", }; label.Location = new Point(235 - label.Size.Width, CompanionDisplayPoint.Y + 220); Level25Label = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(235, CompanionDisplayPoint.Y + 223), Text = "Not Available" }; NameLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 43) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Name", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 40); LevelLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 63) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Level", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 60); ExperienceLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 83) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Experience", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 80); HungerLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 103) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Hunger", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 100); WeightLabel = new DXLabel { Parent = this, ForeColour = Color.White, Outline = true, OutlineColour = Color.Black, IsControl = false, Location = new Point(CompanionDisplayPoint.X + 25, CompanionDisplayPoint.Y + 123) }; label = new DXLabel { Parent = this, Outline = true, Font = new Font(Config.FontName, CEnvir.FontSize(10F), FontStyle.Bold), ForeColour = Color.FromArgb(198, 166, 99), OutlineColour = Color.Black, IsControl = false, Text = "Weight", }; label.Location = new Point(CompanionDisplayPoint.X + 30 - label.Size.Width, CompanionDisplayPoint.Y + 120); VisibleChanged += (o, e) => { if (GameScene.Game.CompanionOptionsBox != null) { GameScene.Game.CompanionOptionsBox.Visible = false; } }; }