public void CreateBuff(ClientBuff buff) { var buffImage = BuffImage(buff.Type); var buffLibrary = Libraries.BuffIcon; if (buffImage >= 20000) { buffImage -= 20000; buffLibrary = Libraries.MagIcon; } if (buffImage >= 10000) { buffImage -= 10000; buffLibrary = Libraries.Prguse2; } var image = new MirImageControl { Library = buffLibrary, Parent = this, Visible = true, Sort = false, Index = buffImage }; _buffList.Insert(0, image); UpdateWindow(); }
public TransformBackDialog() { Index = 537; Library = Libraries.Prguse; Movable = false; Sort = true; Location = new Point(247, 224); TransformButton = new MirButton { Index = 496, HoverIndex = 497, PressedIndex = 498, Library = Libraries.Title, Location = new Point(70, 134), Parent = this, Sound = SoundList.ButtonA, }; TransformButton.Click += (o, e) => Transform_Click(); CloseButton = new MirButton { Index = 360, HoverIndex = 361, PressedIndex = 362, Location = new Point(170, 1), Library = Libraries.Prguse2, Parent = this, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); Title = new MirImageControl { Index = 44, Library = Libraries.Title, Location = new Point(30, 5), Parent = this, NotControl = true, }; ItemBox = new MirImageControl { Index = 989, Library = Libraries.Prguse, Location = new Point(75, 61), Parent = this, NotControl = true, }; ItemCell = new MirItemCell { BorderColour = Color.Lime, GridType = MirGridType.TransformBack, Library = Libraries.Items, Parent = this, Location = new Point(75, 61), ItemSlot = 0, }; }
public KeyboardLayoutDialog() { Index = 920; Library = Libraries.Prguse; Movable = true; Sort = true; Location = Center; TitleLabel = new MirImageControl { // Index = 7, Library = Libraries.Title, Location = new Point(18, 8), Parent = this }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(509, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); }
public RankingDialog() { Index = 260; Library = Libraries.Prguse2; Size = new Size(288, 324); Movable = true; Sort = true; Location = new Point((800 - Size.Width) / 2, (600 - Size.Height) / 2); TitleLabel = new MirImageControl { Index = 11, Library = Libraries.Title, Location = new Point(18, 4), Parent = this }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(255, 5), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); }
public KeybindHeadingRow(string groupName) { BulletImage = new MirImageControl { Parent = this, Index = 201, Library = Libraries.Prguse2, Size = new Size(8, 6), Location = new Point(10, 10), Visible = true }; BulletLabel = new MirLabel { Parent = this, Text = groupName, Size = new Size(100, 20), Location = new Point(20, 5), Font = new Font(Settings.FontName, Settings.FontSize + 1, FontStyle.Bold), Visible = true }; SpacerImage = new MirImageControl { Parent = this, Index = 202, Library = Libraries.Prguse2, Size = new Size(3, 464), Location = new Point(0, 25), Visible = true }; }
public BigMapViewPort() { NotControl = false; Size = new Size(568, 380); SelectedNPCIcon = new MirImageControl { Library = Libraries.MapLinkIcon, NotControl = false, Parent = this, Visible = false }; SelectedNPCIcon.MouseEnter += (o, e) => ParentDialog.MouseLocation = ParentDialog.SelectedNPC.Info.Location; UserRadarDot = new MirImageControl { Library = Libraries.Prguse2, Index = 1350, Parent = this, Visible = false, NotControl = true }; BeforeDraw += (o, e) => OnBeforeDraw(); MouseMove += UpdateBigMapCoordinates; ParentChanged += (o, e) => SetParent(); }
public WorldMapImage() { Library = Libraries.Prguse2; Index = 1360; NotControl = false; Visible = false; Clouds = new MirImageControl() { Parent = this, Library = Libraries.Prguse2, Index = 1365, NotControl = true, Visible = true, Blending = true }; Border = new MirImageControl() { Parent = this, Library = Libraries.Prguse2, Index = 1366, NotControl = true, Visible = true }; TitleLabel = new MirLabel() { AutoSize = true, BackColour = Color.Black, ForeColour = Color.White, Parent = this, Visible = true }; }
public TargetObjectDialog() { Index = 8; Library = Libraries.GameUI; Location = new Point(((Settings.ScreenWidth / 2) - (Size.Width / 2)), 3); TargetHP = new MirImageControl { Index = 75, Library = Libraries.GameUI, Parent = this, Location = new Point(58, 37), NotControl = true, DrawImage = false }; TargetHP.BeforeDraw += TargetHPBeforeDraw; TargetNameLabel = new MirLabel { DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, AutoSize = true, Location = new Point(100, 18), Parent = this, }; HPLabel = new MirLabel { DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, AutoSize = true, Location = new Point(110, 33), Parent = this }; }
public BigMapNPCRow(ClientNPCInfo info) { Info = info; NotControl = false; Size = new Size(140, 25); Visible = false; Sound = SoundList.ButtonA; string name = string.Empty; if (Info.Name.Contains("_")) { string[] splitName = Info.Name.Split('_'); for (int s = 0; s < splitName.Count(); s++) { if (splitName[s] == string.Empty) { continue; } if (s == splitName.Count() - 1) { name += splitName[s]; } else { name += $"({splitName[s]})"; } } } Icon = new MirImageControl { Index = info.Icon, Library = Libraries.MapLinkIcon, Location = new Point(1, 1), NotControl = true, Parent = this, Sound = SoundList.ButtonA }; NameLabel = new MirLabel { AutoSize = true, ForeColour = Color.White, Location = new Point(23, 2), Parent = this, NotControl = true, Text = name, Sound = SoundList.ButtonA }; MouseWheel += (o, e) => ParentDialog.BigMap_MouseWheel(o, e); ParentChanged += (o, e) => SetParent(); Click += (o, e) => Select(); }
public HumupTransformDialog() { Index = 661; Library = Libraries.Prguse; Movable = false; Sort = true; Location = new Point(125, 224); TransformButton = new MirButton { Index = 496, HoverIndex = 497, PressedIndex = 498, Library = Libraries.Title, Location = new Point(132, 177), Parent = this, Sound = SoundList.ButtonA, }; TransformButton.Click += (o, e) => Transform_Click(); CloseButton = new MirButton { Index = 360, HoverIndex = 361, PressedIndex = 362, Location = new Point(286, 5), Library = Libraries.Prguse2, Parent = this, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); Title = new MirImageControl { Index = 44, Library = Libraries.Title, Location = new Point(20, 5), Parent = this, NotControl = true, }; for (int i = 0; i < ItemCells.Length; i++) { ItemCells[i] = new MirItemCell { BorderColour = Color.Lime, GridType = MirGridType.HumupTransform, Library = Libraries.Items, Parent = this, Location = new Point(51 + i * 35, 56), ItemSlot = i, Size = new Size(35, 31) }; } }
public RollDialog() { Movable = false; Sort = true; _animation = new MirAnimatedControl { Parent = this, Index = 0, Library = Libraries.Prguse2, UseOffSet = true, Location = new Point(0, 0), Visible = true }; _animation.AfterAnimation += (o, e) => { switch (_type) { case 0: //Die { if (_currentLoop < 5) { _currentLoop++; return; } _image.Visible = true; _animation.Visible = false; _animation.Animated = false; ReturnResult(); } break; case 1: //Yut { _image.Visible = true; _animation.Visible = false; _animation.Animated = false; ReturnResult(); } break; } }; _image = new MirImageControl { Parent = this, Index = 0, Library = Libraries.Prguse2, UseOffSet = true, Location = new Point(0, 0), Visible = false }; _image.Click += _image_Click; }
protected override void Dispose(bool disposing) { base.Dispose(disposing); Mail = null; SenderLabel = null; MessageLabel = null; SelectedImage = null; IconImage = null; Selected = false; }
public static void Create() { Window = new MirImageControl { Index = 1932, Library = Libraries.Prguse, Parent = GameScene.Scene, Movable = true, Sort = true, Visible = true, Location = new Point(230, 450) }; Window.BeforeDraw += new EventHandler(Window_BeforeDraw); RotateButton = new MirButton { HoverIndex = 1927, Index = 1926, Location = new Point(222, 3), Library = Libraries.Prguse, Parent = Window, PressedIndex = 1928, Sound = SoundList.ClickA, }; CloseButton = new MirButton { HoverIndex = 1924, Index = 1923, Location = new Point(222, 19), Library = Libraries.Prguse, Parent = Window, PressedIndex = 1925, Sound = SoundList.ClickA, }; Grid = new MirItemCell[6]; for (int X = 0; X < 6; X++) { Grid[X] = new MirItemCell { ItemSlot = 40 + X, // Size = new Size(32, 32), BorderColor = Color.Lime, GridType = MirGridType.Inventory, Library = Libraries.Items, Parent = Window, Location = new Point(X * 35 + 12, 3), }; } }
public BossInfoDialog() { Index = 990; Library = Libraries.Prguse; Visible = true; Location = new System.Drawing.Point(Settings.ScreenWidth / 2 - 160, 0); Opacity = 0.75f; NotControl = true; mobImage = new MirImageControl { NotControl = true, Parent = this, Visible = true, Location = new Point(15, 15), Library = Libraries.MobImage, GrayScale = true, // Add a grey scale to the image? :D }; mobLabel = new MirLabel { BackColour = Color.Transparent, OutLine = false, ForeColour = Color.Goldenrod, Parent = this, NotControl = true, Location = new Point(110, 15), AutoSize = true }; CloseButton = new MirButton { Location = new Point(120, 100), Index = 316, HoverIndex = 315, PressedIndex = 317, Library = Libraries.Title, Visible = false, Parent = this }; CloseButton.Click += (o, e) => { if (Visible) { Hide(); } }; }
public ChatNoticeDialog() { Index = 1361; Library = Libraries.Prguse; Movable = false; Sort = false; Location = new Point(Settings.ScreenWidth / 2 - Size.Width / 2, Settings.ScreenHeight / 6 - Size.Height / 2); Opacity = 0.7F; TextLabel1 = new MirLabel { Text = "", Font = new Font(Settings.FontName, 10F), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, NotControl = true, Location = new Point(0, -6), Size = new Size(660, 40), ForeColour = Color.Yellow, OutLineColour = Color.Black, }; TextLabel2 = new MirLabel { Text = "", Font = new Font(Settings.FontName, 15F), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, NotControl = true, Location = new Point(0, 0), Size = new Size(660, 40), ForeColour = Color.Yellow, OutLineColour = Color.Black, }; Layout = new MirImageControl { Index = 1360, Library = Libraries.Prguse, Location = new Point(0, 0), Parent = this }; AfterDraw += ChatNotice_AfterDraw; }
public CompassDialog() { Location = new Point((Settings.ScreenWidth / 2) - 25, (Settings.ScreenHeight / 2) - 120); NotControl = true; Size = new Size(10, 10); Movable = false; Sort = true; _image = new MirImageControl { Parent = this, Index = 0, Library = Libraries.Prguse2, NotControl = true, UseOffSet = true, Location = new Point(0, 0), Visible = true }; }
protected override void Dispose(bool disposing) { if (disposing) { Background = null; _character = null; ServerLabel = null; CharacterDisplay = null; StartGameButton = null; NewCharacterButton = null; DeleteCharacterButton = null; CreditsButton = null; ExitGame = null; CharacterButtons = null; LastAccessLabel = null; LastAccessLabelLabel = null; Characters = null; _selected = 0; } base.Dispose(disposing); }
public AddSocketDialog() { ConfirmButton = new MirButton { Parent = this, }; ConfirmButton.Click += ConfirmButton_Click; CloseButton = new MirButton { Parent = this, }; CloseButton.Click += (o, e) => Hide(); HammerContainer = new MirImageControl { Index = 989, Library = Libraries.Prguse, Parent = this, Location = new Point(100, 18), }; HammerCell = new MirItemCell { GridType = MirGridType.AddSocket, Parent = HammerContainer, CellType = 0 }; ItemContainer = new MirImageControl { Index = 989, Library = Libraries.Prguse, Parent = this, Location = new Point(100, 18), }; ItemCell = new MirItemCell { GridType = MirGridType.AddSocket, Parent = ItemContainer, CellType = 1 }; }
public SelectScene(List <SelectInfo> characters) { SoundManager.PlaySound(SoundList.SelectMusic, true); Disposing += (o, e) => SoundManager.StopSound(SoundList.SelectMusic); Characters = characters; SortList(); KeyPress += SelectScene_KeyPress; Background = new MirImageControl { Index = 64, Library = Libraries.Prguse, Parent = this, }; Title = new MirImageControl { Index = 40, Library = Libraries.Title, Parent = this, Location = new Point(364, 12) }; ServerLabel = new MirLabel { Location = new Point(322, 44), Parent = Background, Size = new Size(155, 17), Text = GameLanguage.GameName, DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter }; StartGameButton = new MirButton { Enabled = false, HoverIndex = 341, Index = 340, Library = Libraries.Title, Location = new Point(110, 568), Parent = Background, PressedIndex = 342, GrayScale = true }; StartGameButton.Click += (o, e) => StartGame(); NewCharacterButton = new MirButton { HoverIndex = 344, Index = 343, Library = Libraries.Title, Location = new Point(230, 568), Parent = Background, PressedIndex = 345, }; NewCharacterButton.Click += (o, e) => _character = new NewCharacterDialog { Parent = this }; DeleteCharacterButton = new MirButton { HoverIndex = 347, Index = 346, Library = Libraries.Title, Location = new Point(350, 568), Parent = Background, PressedIndex = 348 }; DeleteCharacterButton.Click += (o, e) => DeleteCharacter(); CreditsButton = new MirButton { HoverIndex = 350, Index = 349, Library = Libraries.Title, Location = new Point(470, 568), Parent = Background, PressedIndex = 351 }; ExitGame = new MirButton { HoverIndex = 353, Index = 352, Library = Libraries.Title, Location = new Point(590, 568), Parent = Background, PressedIndex = 354 }; ExitGame.Click += (o, e) => Program.Form.Close(); CharacterDisplay = new MirAnimatedControl { Animated = true, AnimationCount = 16, AnimationDelay = 250, FadeIn = true, FadeInDelay = 75, FadeInRate = 0.1F, Index = 220, Library = Libraries.ChrSel, Location = new Point(200, 300), Parent = Background, UseOffSet = true, Visible = false }; CharacterDisplay.AfterDraw += (o, e) => { // if (_selected >= 0 && _selected < Characters.Count && characters[_selected].Class == MirClass.Wizard) Libraries.ChrSel.DrawBlend(CharacterDisplay.Index + 560, CharacterDisplay.DisplayLocationWithoutOffSet, Color.White, true); }; CharacterButtons = new CharacterButton[4]; CharacterButtons[0] = new CharacterButton { Location = new Point(447, 122), Parent = Background, Sound = SoundList.ButtonA, }; CharacterButtons[0].Click += (o, e) => { if (characters.Count <= 0) { return; } _selected = 0; UpdateInterface(); }; CharacterButtons[1] = new CharacterButton { Location = new Point(447, 226), Parent = Background, Sound = SoundList.ButtonA, }; CharacterButtons[1].Click += (o, e) => { if (characters.Count <= 1) { return; } _selected = 1; UpdateInterface(); }; CharacterButtons[2] = new CharacterButton { Location = new Point(447, 330), Parent = Background, Sound = SoundList.ButtonA, }; CharacterButtons[2].Click += (o, e) => { if (characters.Count <= 2) { return; } _selected = 2; UpdateInterface(); }; CharacterButtons[3] = new CharacterButton { Location = new Point(447, 434), Parent = Background, Sound = SoundList.ButtonA, }; CharacterButtons[3].Click += (o, e) => { if (characters.Count <= 3) { return; } _selected = 3; UpdateInterface(); }; LastAccessLabel = new MirLabel { Location = new Point(140, 509), Parent = Background, Size = new Size(180, 21), DrawFormat = TextFormatFlags.Left | TextFormatFlags.VerticalCenter, Border = true, }; LastAccessLabelLabel = new MirLabel { Location = new Point(-80, -1), Parent = LastAccessLabel, Text = GameLanguage.LastOnline, Size = new Size(100, 21), DrawFormat = TextFormatFlags.Left | TextFormatFlags.VerticalCenter, Border = true, }; UpdateInterface(); }
public MailComposeParcelDialog() { Index = 674; Library = Libraries.Title; Size = new Size(236, 384); Movable = true; Sort = true; Location = new Point(GameScene.Scene.InventoryDialog.Size.Width + 10, 0); CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(Size.Width - 27, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => { ResetLockedCells(); Hide(); }; RecipientNameLabel = new MirLabel { Text = "", Parent = this, Font = new Font(Settings.FontName, 8F), ForeColour = Color.White, Location = new Point(70, 35), Size = new Size(150, 15), NotControl = true, }; MessageTextBox = new MirTextBox { ForeColour = Color.White, Parent = this, Font = new Font(Settings.FontName, 8F), Location = new Point(15, 98), Size = new Size(202, 165), }; MessageTextBox.MultiLine(); StampButton = new MirButton { Index = 203, HoverIndex = 203, PressedIndex = 203, Location = new Point(73, 56), Size = new Size(20, 20), Library = Libraries.Prguse2, Parent = this, Sound = SoundList.ButtonA, }; StampButton.Click += (o, e) => { StampParcel(); }; ItemCover = new MirImageControl { Index = 676, Location = new Point(63, 310), Size = new Size(144, 33), Library = Libraries.Title, Parent = this }; for (int i = 0; i < Cells.Length; i++) { Cells[i] = new MirItemCell { BorderColour = Color.Lime, Size = new Size(35, 31), GridType = MirGridType.Mail, Library = Libraries.Items, Parent = this, Location = new Point(27 + (i * 36), 311), ItemSlot = i }; } ParcelCostLabel = new MirLabel { DrawFormat = TextFormatFlags.VerticalCenter, Font = new Font(Settings.FontName, 8F), Location = new Point(63, 269), Parent = this, Size = new Size(143, 15), }; GoldSendLabel = new MirLabel { DrawFormat = TextFormatFlags.VerticalCenter, Font = new Font(Settings.FontName, 8F), Location = new Point(63, 290), Parent = this, Size = new Size(143, 15), Sound = SoundList.Gold, }; GoldSendLabel.Click += (o, e) => { if (GameScene.SelectedCell == null && GameScene.Gold > 0) { MirAmountBox amountBox = new MirAmountBox("Send Amount:", 116, GameScene.Gold); amountBox.OKButton.Click += (c, a) => { if (amountBox.Amount > 0) { GiftGoldAmount += amountBox.Amount; GameScene.Gold -= amountBox.Amount; } GoldSendLabel.Text = GiftGoldAmount.ToString("###,###,##0"); CalculatePostage(); }; amountBox.Show(); GameScene.PickedUpGold = false; } }; SendButton = new MirButton { Index = 607, HoverIndex = 608, PressedIndex = 609, Parent = this, Library = Libraries.Title, Sound = SoundList.ButtonA, Location = new Point(30, 350) }; SendButton.Click += (o, e) => { Network.Enqueue(new C.SendMail { Name = RecipientNameLabel.Text, Message = MessageTextBox.Text, Gold = GiftGoldAmount, ItemsIdx = ItemsIdx, Stamped = Stamped }); }; CancelButton = new MirButton { Index = 193, HoverIndex = 194, PressedIndex = 195, Parent = this, Library = Libraries.Title, Sound = SoundList.ButtonA, Location = new Point(135, 350) }; CancelButton.Click += (o, e) => { ResetLockedCells(); Hide(); }; }
public SocketingDialog() { Index = 143; Library = Libraries.EdensEliteInter; Location = new Point(Settings.ScreenWidth / 2 - this.Size.Width / 2, Settings.ScreenHeight / 2 - this.Size.Height / 2); Sort = true; Movable = true; CloseBtn = new MirButton { Parent = this, Library = Libraries.Prguse2, Location = new Point(236, 0), Index = 7, HoverIndex = 8, PressedIndex = 9, Sound = SoundList.ButtonA, Hint = "Exit" }; CloseBtn.Click += (o, e) => Hide(); AplyBtn = new MirButton { Parent = this, Library = Libraries.CustomTitle, Location = new Point(160, 20), Index = 712, HoverIndex = 713, PressedIndex = 714, Sound = SoundList.ButtonA, Hint = "Forge" }; AplyBtn.Click += (o, e) => Hide(); SocketsContainer = new MirImageControl { Index = 28, Library = Libraries.EdensEliteInter, Location = new Point(12, 56), Parent = this, }; RuneSlots[0] = new MirImageControl { Index = 989, Library = Libraries.Prguse, Parent = this, Location = new Point(100, 18), }; // Main Item ItemCells[0] = new MirItemCell { BorderColour = Color.OrangeRed, GridType = MirGridType.Socketing, Library = Libraries.Items, Parent = RuneSlots[0], Location = new Point(2, 2), ItemSlot = 0, Hint = "Place your Item here." }; RuneSlots[1] = new MirImageControl { Index = 16, Library = Libraries.Prguse2, Parent = SocketsContainer, Location = new Point(32, 9), Visible = false }; // Runes ItemCells[1] = new MirItemCell { BorderColour = Color.Aqua, GridType = MirGridType.Socketing, Library = Libraries.Items, Parent = RuneSlots[1], Location = new Point(2, 2), ItemSlot = 1, Visible = false, Hint = "Place your Rune here." }; RuneSlots[2] = new MirImageControl { Index = 16, Library = Libraries.Prguse2, Parent = SocketsContainer, Location = new Point(96, 9), Visible = false }; ItemCells[2] = new MirItemCell { BorderColour = Color.Aqua, GridType = MirGridType.Socketing, Library = Libraries.Items, Parent = RuneSlots[2], Location = new Point(2, 2), ItemSlot = 2, Visible = false, Hint = "Place your Rune here." }; RuneSlots[3] = new MirImageControl { Index = 16, Library = Libraries.Prguse2, Parent = SocketsContainer, Location = new Point(160, 9), Visible = false }; ItemCells[3] = new MirItemCell { BorderColour = Color.Aqua, GridType = MirGridType.Socketing, Library = Libraries.Items, Parent = RuneSlots[3], Location = new Point(2, 2), ItemSlot = 3, Visible = false, Hint = "Place your Rune here." }; }
public NewCharacterDialog() { Index = 73; Library = Libraries.Prguse; Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2); Modal = true; TitleLabel = new MirImageControl { Index = 20, Library = Libraries.Title, Location = new Point(206, 11), Parent = this, }; CancelButton = new MirButton { HoverIndex = 281, Index = 280, Library = Libraries.Title, Location = new Point(425, 425), Parent = this, PressedIndex = 282 }; CancelButton.Click += (o, e) => Dispose(); OKButton = new MirButton { Enabled = false, HoverIndex = 361, Index = 360, Library = Libraries.Title, Location = new Point(160, 425), Parent = this, PressedIndex = 362, }; OKButton.Click += (o, e) => CreateCharacter(); NameTextBox = new MirTextBox { Location = new Point(325, 268), Parent = this, Size = new Size(240, 20), MaxLength = Globals.MaxCharacterNameLength }; NameTextBox.TextBox.KeyPress += TextBox_KeyPress; NameTextBox.TextBox.TextChanged += CharacterNameTextBox_TextChanged; NameTextBox.SetFocus(); CharacterDisplay = new MirAnimatedControl { Animated = true, AnimationCount = 16, AnimationDelay = 250, Index = 20, Library = Libraries.ChrSel, Location = new Point(120, 250), Parent = this, UseOffSet = true, }; CharacterDisplay.AfterDraw += (o, e) => { if (_class == MirClass.Wizard) { Libraries.ChrSel.DrawBlend(CharacterDisplay.Index + 560, CharacterDisplay.DisplayLocationWithoutOffSet, Color.White, true); } }; WarriorButton = new MirButton { HoverIndex = 2427, Index = 2427, Library = Libraries.Prguse, Location = new Point(323, 296), Parent = this, PressedIndex = 2428, Sound = SoundList.ButtonA, }; WarriorButton.Click += (o, e) => { _class = MirClass.Warrior; UpdateInterface(); }; WizardButton = new MirButton { HoverIndex = 2430, Index = 2429, Library = Libraries.Prguse, Location = new Point(373, 296), Parent = this, PressedIndex = 2431, Sound = SoundList.ButtonA, }; WizardButton.Click += (o, e) => { _class = MirClass.Wizard; UpdateInterface(); }; TaoistButton = new MirButton { HoverIndex = 2433, Index = 2432, Library = Libraries.Prguse, Location = new Point(423, 296), Parent = this, PressedIndex = 2434, Sound = SoundList.ButtonA, }; TaoistButton.Click += (o, e) => { _class = MirClass.Taoist; UpdateInterface(); }; AssassinButton = new MirButton { HoverIndex = 2436, Index = 2435, Library = Libraries.Prguse, Location = new Point(473, 296), Parent = this, PressedIndex = 2437, Sound = SoundList.ButtonA, }; AssassinButton.Click += (o, e) => { _class = MirClass.Assassin; UpdateInterface(); }; ArcherButton = new MirButton { HoverIndex = 2439, Index = 2438, Library = Libraries.Prguse, Location = new Point(523, 296), Parent = this, PressedIndex = 2440, Sound = SoundList.ButtonA, }; ArcherButton.Click += (o, e) => { _class = MirClass.Archer; UpdateInterface(); }; MaleButton = new MirButton { HoverIndex = 2421, Index = 2421, Library = Libraries.Prguse, Location = new Point(323, 343), Parent = this, PressedIndex = 2422, Sound = SoundList.ButtonA, }; MaleButton.Click += (o, e) => { _gender = MirGender.Male; UpdateInterface(); }; FemaleButton = new MirButton { HoverIndex = 2424, Index = 2423, Library = Libraries.Prguse, Location = new Point(373, 343), Parent = this, PressedIndex = 2425, Sound = SoundList.ButtonA, }; FemaleButton.Click += (o, e) => { _gender = MirGender.Female; UpdateInterface(); }; Description = new MirLabel { Border = true, Location = new Point(279, 70), Parent = this, Size = new Size(278, 170), Text = WarriorDescription, }; }
public MailItemRow() { Sound = SoundList.ButtonA; Size = new Size(290, 33); BeforeDraw += QuestRow_BeforeDraw; IconImage = new MirImageControl { Index = 0, Library = Libraries.Prguse, Location = new Point(0, 0), Parent = this }; UnreadImage = new MirImageControl { Index = 550, Library = Libraries.Prguse, Location = new Point(5, 17), Parent = this, Visible = false }; LockedImage = new MirImageControl { Index = 551, Library = Libraries.Prguse, Location = new Point(5, 17), Parent = this, Visible = false }; ParcelImage = new MirImageControl { Index = 552, Library = Libraries.Prguse, Location = new Point(5, 17), //20 Parent = this, Visible = false }; SelectedImage = new MirImageControl { Index = 545, Library = Libraries.Prguse, Location = new Point(-5, -3), Parent = this, Visible = false, NotControl = true }; SenderLabel = new MirLabel { Location = new Point(35, 0), Size = new Size(130, 31), DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, }; MessageLabel = new MirLabel { Location = new Point(170, 0), Size = new Size(115, 31), DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, }; UpdateInterface(); }
public MailListDialog() { Index = 670; Library = Libraries.Title; Size = new Size(312, 444); Movable = true; Sort = true; Location = new Point((Settings.ScreenWidth - Size.Width) - 150, 5); TitleLabel = new MirImageControl { Index = 7, Library = Libraries.Title, Location = new Point(18, 9), Parent = this }; TitleTypeLabel = new MirLabel { Text = "TYPE", Parent = this, Font = new Font(Settings.FontName, Settings.FontSize - 1, FontStyle.Italic), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Size = new Size(37, 19), Location = new Point(8, 34) }; TitleSenderLabel = new MirLabel { Text = "SENDER", Parent = this, Font = new Font(Settings.FontName, Settings.FontSize - 1, FontStyle.Italic), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Size = new Size(132, 19), Location = new Point(47, 34) }; TitleMessageLabel = new MirLabel { Text = "MESSAGE", Parent = this, Font = new Font(Settings.FontName, Settings.FontSize - 1, FontStyle.Italic), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Size = new Size(122, 19), Location = new Point(181, 34) }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(Size.Width - 24, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); HelpButton = new MirButton { Index = 257, HoverIndex = 258, PressedIndex = 259, Library = Libraries.Prguse2, Parent = this, Location = new Point(Size.Width - 50, 3), Sound = SoundList.ButtonA, }; HelpButton.Click += (o, e) => GameScene.Scene.HelpDialog.DisplayPage(""); PreviousButton = new MirButton { Index = 240, HoverIndex = 241, PressedIndex = 242, Library = Libraries.Prguse2, Parent = this, Location = new Point(102, Size.Height - 55), Sound = SoundList.ButtonA, }; PreviousButton.Click += (o, e) => { if (CurrentPage <= 1) { return; } SelectedMail = null; CurrentPage--; StartIndex -= 10; UpdateInterface(); }; PageLabel = new MirLabel { Text = "", Parent = this, Location = new Point(120, Size.Height - 55), Size = new Size(67, 15), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, }; NextButton = new MirButton { Index = 243, HoverIndex = 244, PressedIndex = 245, Library = Libraries.Prguse2, Parent = this, Location = new Point(192, Size.Height - 55), Sound = SoundList.ButtonA, }; NextButton.Click += (o, e) => { if (CurrentPage >= PageCount) { return; } SelectedMail = null; CurrentPage++; StartIndex += 10; UpdateInterface(); }; #region Action Buttons SendButton = new MirButton { Index = 563, HoverIndex = 564, PressedIndex = 565, Library = Libraries.Prguse, Parent = this, Location = new Point(75, 414), Sound = SoundList.ButtonA, Hint = GameLanguage.Send }; SendButton.Click += (o, e) => { MirInputBox inputBox = new MirInputBox(GameLanguage.EnterMailToName); inputBox.OKButton.Click += (o1, e1) => { //open letter dialog, pass in name GameScene.Scene.MailComposeLetterDialog.ComposeMail(inputBox.InputTextBox.Text); inputBox.Dispose(); }; inputBox.Show(); }; ReplyButton = new MirButton { Index = 569, HoverIndex = 570, PressedIndex = 571, Library = Libraries.Prguse, Parent = this, Location = new Point(102, 414), Sound = SoundList.ButtonA, Hint = GameLanguage.Reply }; ReplyButton.Click += (o, e) => { if (SelectedMail == null) { return; } GameScene.Scene.MailComposeLetterDialog.ComposeMail(SelectedMail.SenderName); }; ReadButton = new MirButton { Index = 572, HoverIndex = 573, PressedIndex = 574, Library = Libraries.Prguse, Parent = this, Location = new Point(129, 414), Sound = SoundList.ButtonA, Hint = GameLanguage.Read }; ReadButton.Click += (o, e) => { if (SelectedMail == null) { return; } if (SelectedMail.Gold > 0 || SelectedMail.Items.Count > 0) { GameScene.Scene.MailReadParcelDialog.ReadMail(SelectedMail); } else { GameScene.Scene.MailReadLetterDialog.ReadMail(SelectedMail); } }; DeleteButton = new MirButton { Index = 557, HoverIndex = 558, PressedIndex = 559, Library = Libraries.Prguse, Parent = this, Location = new Point(156, 414), Sound = SoundList.ButtonA, Hint = GameLanguage.Delete }; DeleteButton.Click += (o, e) => { if (SelectedMail == null || SelectedMail.Locked) { return; } if (SelectedMail.Items.Count > 0 || SelectedMail.Gold > 0) { MirMessageBox messageBox = new MirMessageBox("This parcel contains items or gold. Are you sure you want to delete it?", MirMessageBoxButtons.YesNo); messageBox.YesButton.Click += (o1, e1) => { Network.Enqueue(new C.DeleteMail { MailID = SelectedMail.MailID }); SelectedMail = null; }; messageBox.Show(); } else { Network.Enqueue(new C.DeleteMail { MailID = SelectedMail.MailID }); SelectedMail = null; } }; BlockListButton = new MirButton { Index = 520, HoverIndex = 521, PressedIndex = 522, Library = Libraries.Prguse, Parent = this, Location = new Point(183, 414), Sound = SoundList.ButtonA, Hint = GameLanguage.BlockList, GrayScale = true, Enabled = false }; BugReportButton = new MirButton { Index = 523, HoverIndex = 524, PressedIndex = 525, Library = Libraries.Prguse, Parent = this, Location = new Point(210, 414), Sound = SoundList.ButtonA, Hint = "Report Bug", GrayScale = true, Enabled = false }; #endregion }
public HeroInfoPanel() { Index = 14; Library = Libraries.Prguse; Location = new Point(95, 48); Avatar = new MirImageControl { Index = 1400, Library = Libraries.Prguse, Location = new Point(14, 19), Parent = this, Visible = true }; Avatar.BeforeDraw += Avatar_BeforeDraw; DangerAvatar = new MirImageControl { Index = 1750, Library = Libraries.Prguse, Location = new Point(14, 19), Parent = this, Visible = false }; DeadAvatar = new MirImageControl { Index = 1379, Library = Libraries.Prguse, Location = new Point(14, 19), Parent = this, Visible = false }; NameContainer = new MirImageControl { Index = 10, Library = Libraries.Prguse, Location = new Point(26, 60), Parent = this, Visible = true }; LevelLabel = new MirLabel { AutoSize = false, Size = new Size(17, 14), Location = new Point(3, -1), DrawFormat = TextFormatFlags.HorizontalCenter, Parent = NameContainer, }; NameLabel = new MirLabel { AutoSize = false, Size = new Size(97, 14), Location = new Point(2, 14), DrawFormat = TextFormatFlags.HorizontalCenter, Parent = NameContainer, }; HealthContainer = new MirImageControl { Index = 11, Library = Libraries.Prguse, Location = new Point(57, 26), Parent = this, Visible = true }; HealthBar = new MirImageControl { Index = 1951, Library = Libraries.Prguse, Location = new Point(18, 6), Parent = HealthContainer, Visible = true, DrawImage = false, NotControl = true }; HealthBar.BeforeDraw += HealthBar_BeforeDraw; ManaBar = new MirImageControl { Index = 1952, Library = Libraries.Prguse, Location = new Point(18, 19), Parent = HealthContainer, Visible = true, DrawImage = false, NotControl = true }; ManaBar.BeforeDraw += ManaBar_BeforeDraw; ExperienceBar = new MirImageControl { Index = 1953, Library = Libraries.Prguse, Location = new Point(18, 32), Parent = HealthContainer, Visible = true, DrawImage = false, NotControl = true }; ExperienceBar.BeforeDraw += ExperienceBar_BeforeDraw; HPItem = new HeroAutoPotPreview() { Parent = this, Location = new Point(86, 5), GetInfo = () => { return(GameScene.Hero?.HPItem[0]?.Info); } }; MPItem = new HeroAutoPotPreview() { Parent = this, Location = new Point(106, 5), GetInfo = () => { return(GameScene.Hero?.MPItem[0]?.Info); } }; }
public HelpDialog() { Index = 920; Library = Libraries.Prguse; Movable = true; Sort = true; Location = Center; MirImageControl TitleLabel = new MirImageControl { Index = 57, Library = Libraries.Title, Location = new Point(18, 9), Parent = this }; PreviousButton = new MirButton { Index = 240, HoverIndex = 241, PressedIndex = 242, Library = Libraries.Prguse2, Parent = this, Size = new Size(16, 16), Location = new Point(210, 485), Sound = SoundList.ButtonA, }; PreviousButton.Click += (o, e) => { CurrentPageNumber--; if (CurrentPageNumber < 0) { CurrentPageNumber = Pages.Count - 1; } DisplayPage(CurrentPageNumber); }; NextButton = new MirButton { Index = 243, HoverIndex = 244, PressedIndex = 245, Library = Libraries.Prguse2, Parent = this, Size = new Size(16, 16), Location = new Point(310, 485), Sound = SoundList.ButtonA, }; NextButton.Click += (o, e) => { CurrentPageNumber++; if (CurrentPageNumber > Pages.Count - 1) { CurrentPageNumber = 0; } DisplayPage(CurrentPageNumber); }; PageLabel = new MirLabel { Text = "", Font = new Font(Settings.FontName, 9F), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, NotControl = true, Location = new Point(230, 480), Size = new Size(80, 20) }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(509, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); LoadImagePages(); DisplayPage(); }
public GuildTerritoryDialog() { Index = 680; Library = Libraries.CustomPrguse; Movable = true; Sort = true; #region Buttons. var closeButton = new MirButton { Parent = this, Index = 361, PressedIndex = 363, HoverIndex = 362, Library = Libraries.CustomPrguse, Location = new Point(544, 8), Hint = "Exit" }; closeButton.Click += (o, e) => Hide(); var prevButton = new MirButton { HoverIndex = 241, Index = 240, Location = new Point(214, 213), Library = Libraries.CustomPrguse2, Parent = this, PressedIndex = 242, Sound = SoundList.ButtonA, Hint = "Page Back" }; prevButton.Click += (o, e) => { if ((Page - 1) >= 0) { Page--; Network.Enqueue(new C.GuildTerritoryPage { Page = Page }); Reset(); } }; var nextButton = new MirButton { HoverIndex = 244, Index = 243, Location = new Point(317, 213), Library = Libraries.CustomPrguse2, Parent = this, PressedIndex = 245, Sound = SoundList.ButtonA, Hint = "Page Forward" }; nextButton.Click += (o, e) => { if (((Page + 1) * 7) < Lenght) { Page++; Network.Enqueue(new C.GuildTerritoryPage { Page = Page }); Reset(); } }; var mailButton = new MirButton { Index = 437, HoverIndex = 438, PressedIndex = 439, Library = Libraries.CustomPrguse, Location = new Point(262, 208), Sound = SoundList.ButtonA, Parent = this, Hint = "Mail a Guild Leader" }; mailButton.Click += (o, e) => { var GT = GTRowList.FirstOrDefault(x => x.Idx.Text == selectedIndex.ToString()); if (GT == null || GT.OwnerName.Text == "None") { return; } GameScene.Scene.MailComposeLetterDialog.ComposeMail(GT.OwnerName.Text); }; #endregion #region Labels. var _titleLabel = new MirImageControl { Index = 54, Library = Libraries.CustomTitle, Location = new Point(217, 11), Parent = this }; var __gtnumberLabel = new MirLabel { Location = new Point(15, 38), AutoSize = true, Parent = this, ForeColour = Color.Goldenrod, Font = new Font(Settings.FontName, 8F), NotControl = true, BackColour = Color.Transparent, Text = "Gt #" }; var __gtguildLabel = new MirLabel { Location = new Point(60, 38), AutoSize = true, Parent = this, ForeColour = Color.Goldenrod, Font = new Font(Settings.FontName, 8F), NotControl = true, BackColour = Color.Transparent, Text = "Owning Guild" }; var __gtguildownersLabel = new MirLabel { Location = new Point(230, 38), AutoSize = true, Parent = this, ForeColour = Color.Goldenrod, Font = new Font(Settings.FontName, 8F), NotControl = true, BackColour = Color.Transparent, Text = "Guild Leaders" }; var __gtstatusLabel = new MirLabel { Location = new Point(380, 38), AutoSize = true, Parent = this, ForeColour = Color.Goldenrod, Font = new Font(Settings.FontName, 8F), NotControl = true, BackColour = Color.Transparent, Text = "Gt Status" }; var __gtpriceLabel = new MirLabel { Location = new Point(480, 38), AutoSize = true, Parent = this, ForeColour = Color.Goldenrod, Font = new Font(Settings.FontName, 8F), NotControl = true, BackColour = Color.Transparent, Text = "Gt Price" }; for (int i = 0; i < 7; i++) { GTRow gt = new GTRow { Parent = this, Location = new Point(5, 60 + 20 * i), Border = false, BorderColour = Color.Lime, }; gt.Idx.Text = (i + 1).ToString(); gt.GuildOwner.Text = "None"; gt.OwnerName.Text = "None"; gt.Status.Text = "Available"; gt.Price.Text = "10,000,000"; gt.Click += (e, o) => { var obj = ((GTRow)e); Reset(); if (obj.GuildOwner.Text != string.Empty) { int.TryParse(obj.Idx.Text, out selectedIndex); obj.Border = true; } }; GTRowList.Add(gt); } #endregion }
public MagicButton() { Size = new Size(231, 33); SkillButton = new MirButton { Index = 0, PressedIndex = 1, Library = Libraries.MagIcon2, Parent = this, Location = new Point(36, 0), Sound = SoundList.ButtonA, }; SkillButton.Click += (o, e) => new AssignKeyPanel(Magic); LevelImage = new MirImageControl { Index = 516, Library = Libraries.Title, Location = new Point(73, 7), Parent = this, NotControl = true, }; ExpImage = new MirImageControl { Index = 517, Library = Libraries.Title, Location = new Point(73, 19), Parent = this, NotControl = true, }; LevelLabel = new MirLabel { AutoSize = true, Parent = this, Location = new Point(88, 2), NotControl = true, }; NameLabel = new MirLabel { AutoSize = true, Parent = this, Location = new Point(109, 2), NotControl = true, }; ExpLabel = new MirLabel { AutoSize = true, Parent = this, Location = new Point(109, 15), NotControl = true, }; KeyLabel = new MirLabel { AutoSize = true, Parent = this, Location = new Point(2, 2), NotControl = true, }; CoolDown = new MirAnimatedControl { Library = Libraries.Prguse2, Parent = this, Location = new Point(36, 0), NotControl = true, UseOffSet = true, Loop = false, Animated = false, Opacity = 0.6F }; }
public CharacterDialog() { Index = 504; Library = Libraries.Title; Location = new Point(Settings.ScreenWidth - 264, 0); Movable = true; Sort = true; BeforeDraw += (o, e) => RefreshInterface(); CharacterPage = new MirImageControl { Index = 340, Parent = this, Library = Libraries.Prguse, Location = new Point(8, 90), }; CharacterPage.AfterDraw += (o, e) => { if (Libraries.StateItems == null) { return; } ItemInfo RealItem = null; if (Grid[(int)EquipmentSlot.Armour].Item != null) { if (GameScene.User.WingEffect == 1 || GameScene.User.WingEffect == 2) { int wingOffset = GameScene.User.WingEffect == 1 ? 2 : 4; int genderOffset = MapObject.User.Gender == MirGender.Male ? 0 : 1; Libraries.Prguse2.DrawBlend(1200 + wingOffset + genderOffset, DisplayLocation, Color.White, true, 1F); } RealItem = Functions.GetRealItem(Grid[(int)EquipmentSlot.Armour].Item.Info, MapObject.User.Level, MapObject.User.Class, GameScene.ItemInfoList); Libraries.StateItems.Draw(RealItem.Image, DisplayLocation, Color.White, true, 1F); } if (Grid[(int)EquipmentSlot.Weapon].Item != null) { RealItem = Functions.GetRealItem(Grid[(int)EquipmentSlot.Weapon].Item.Info, MapObject.User.Level, MapObject.User.Class, GameScene.ItemInfoList); Libraries.StateItems.Draw(RealItem.Image, DisplayLocation, Color.White, true, 1F); } if (Grid[(int)EquipmentSlot.Helmet].Item != null) { Libraries.StateItems.Draw(Grid[(int)EquipmentSlot.Helmet].Item.Info.Image, DisplayLocation, Color.White, true, 1F); } else { if (MapObject.User.Class == MirClass.Monk) { return; } int hair = 441 + MapObject.User.Hair + (MapObject.User.Class == MirClass.Assassin ? 20 : 0) + (MapObject.User.Gender == MirGender.Male ? 0 : 40); int offSetX = MapObject.User.Class == MirClass.Assassin ? (MapObject.User.Gender == MirGender.Male ? 6 : 4) : 0; int offSetY = MapObject.User.Class == MirClass.Assassin ? (MapObject.User.Gender == MirGender.Male ? 25 : 18) : 0; Libraries.Prguse.Draw(hair, new Point(DisplayLocation.X + offSetX, DisplayLocation.Y + offSetY), Color.White, true, 1F); } }; StatusPage = new MirImageControl { Index = 506, Parent = this, Library = Libraries.Title, Location = new Point(8, 90), Visible = false, }; StatusPage.BeforeDraw += (o, e) => { ACLabel.Text = string.Format("{0}-{1}", MapObject.User.MinAC, MapObject.User.MaxAC); MACLabel.Text = string.Format("{0}-{1}", MapObject.User.MinMAC, MapObject.User.MaxMAC); DCLabel.Text = string.Format("{0}-{1}", MapObject.User.MinDC, MapObject.User.MaxDC); MCLabel.Text = string.Format("{0}-{1}", MapObject.User.MinMC, MapObject.User.MaxMC); SCLabel.Text = string.Format("{0}-{1}", MapObject.User.MinSC, MapObject.User.MaxSC); HealthLabel.Text = string.Format("{0}/{1}", MapObject.User.HP, MapObject.User.MaxHP); ManaLabel.Text = string.Format("{0}/{1}", MapObject.User.MP, MapObject.User.MaxMP); CritRLabel.Text = string.Format("{0}%", MapObject.User.CriticalRate); CritDLabel.Text = string.Format("{0}", MapObject.User.CriticalDamage); AttkSpdLabel.Text = string.Format("{0}", MapObject.User.ASpeed); AccLabel.Text = string.Format("+{0}", MapObject.User.Accuracy); AgilLabel.Text = string.Format("+{0}", MapObject.User.Agility); LuckLabel.Text = string.Format("{0}", MapObject.User.Luck); }; StatePage = new MirImageControl { Index = 507, Parent = this, Library = Libraries.Title, Location = new Point(8, 90), Visible = false }; StatePage.BeforeDraw += (o, e) => { ExpPLabel.Text = string.Format("{0}/{1}", MapObject.User.Experience, (double)MapObject.User.MaxExperience); BagWLabel.Text = string.Format("{0}/{1}", MapObject.User.CurrentBagWeight, MapObject.User.MaxBagWeight); WearWLabel.Text = string.Format("{0}/{1}", MapObject.User.CurrentWearWeight, MapObject.User.MaxWearWeight); HandWLabel.Text = string.Format("{0}/{1}", MapObject.User.CurrentHandWeight, MapObject.User.MaxHandWeight); MagicRLabel.Text = string.Format("+{0}", MapObject.User.MagicResist); PoisonResLabel.Text = string.Format("+{0}", MapObject.User.PoisonResist); HealthRLabel.Text = string.Format("+{0}", MapObject.User.HealthRecovery); ManaRLabel.Text = string.Format("+{0}", MapObject.User.SpellRecovery); PoisonRecLabel.Text = string.Format("+{0}", MapObject.User.PoisonRecovery); HolyTLabel.Text = string.Format("+{0}", MapObject.User.Holy); FreezeLabel.Text = string.Format("+{0}", MapObject.User.Freezing); PoisonAtkLabel.Text = string.Format("+{0}", MapObject.User.PoisonAttack); }; SkillPage = new MirImageControl { Index = 508, Parent = this, Library = Libraries.Title, Location = new Point(8, 90), Visible = false }; CharacterButton = new MirButton { Index = 500, Library = Libraries.Title, Location = new Point(8, 70), Parent = this, PressedIndex = 500, Size = new Size(64, 20), Sound = SoundList.ButtonA, }; CharacterButton.Click += (o, e) => ShowCharacterPage(); StatusButton = new MirButton { Library = Libraries.Title, Location = new Point(70, 70), Parent = this, PressedIndex = 501, Size = new Size(64, 20), Sound = SoundList.ButtonA }; StatusButton.Click += (o, e) => ShowStatusPage(); StateButton = new MirButton { Library = Libraries.Title, Location = new Point(132, 70), Parent = this, PressedIndex = 502, Size = new Size(64, 20), Sound = SoundList.ButtonA }; StateButton.Click += (o, e) => ShowStatePage(); SkillButton = new MirButton { Library = Libraries.Title, Location = new Point(194, 70), Parent = this, PressedIndex = 503, Size = new Size(64, 20), Sound = SoundList.ButtonA }; SkillButton.Click += (o, e) => ShowSkillPage(); CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(241, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); NameLabel = new MirLabel { DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, Location = new Point(0, 12), Size = new Size(264, 20), NotControl = true, }; GuildLabel = new MirLabel { DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, Location = new Point(0, 33), Size = new Size(264, 30), NotControl = true, }; ClassImage = new MirImageControl { Index = 100, Library = Libraries.Prguse, Location = new Point(15, 33), Parent = this, NotControl = true, }; Grid = new MirItemCell[Enum.GetNames(typeof(EquipmentSlot)).Length]; Grid[(int)EquipmentSlot.Weapon] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Weapon, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(123, 7), }; Grid[(int)EquipmentSlot.Armour] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Armour, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(163, 7), }; Grid[(int)EquipmentSlot.Helmet] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Helmet, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(203, 7), }; Grid[(int)EquipmentSlot.Torch] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Torch, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(203, 134), }; Grid[(int)EquipmentSlot.Necklace] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Necklace, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(203, 98), }; Grid[(int)EquipmentSlot.BraceletL] = new MirItemCell { ItemSlot = (int)EquipmentSlot.BraceletL, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(8, 170), }; Grid[(int)EquipmentSlot.BraceletR] = new MirItemCell { ItemSlot = (int)EquipmentSlot.BraceletR, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(203, 170), }; Grid[(int)EquipmentSlot.RingL] = new MirItemCell { ItemSlot = (int)EquipmentSlot.RingL, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(8, 206), }; Grid[(int)EquipmentSlot.RingR] = new MirItemCell { ItemSlot = (int)EquipmentSlot.RingR, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(203, 206), }; Grid[(int)EquipmentSlot.Amulet] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Amulet, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(8, 242), }; Grid[(int)EquipmentSlot.Boots] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Boots, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(48, 242), }; Grid[(int)EquipmentSlot.Belt] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Belt, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(88, 242), }; Grid[(int)EquipmentSlot.Stone] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Stone, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(128, 242), }; Grid[(int)EquipmentSlot.Mount] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Mount, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(203, 62), }; // STATS I HealthLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 20), NotControl = true, Text = "0-0", }; ManaLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 38), NotControl = true, Text = "0-0", }; ACLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 56), NotControl = true, Text = "0-0", }; MACLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 74), NotControl = true, Text = "0-0", }; DCLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 92), NotControl = true, Text = "0-0" }; MCLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 110), NotControl = true, Text = "0/0" }; SCLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 128), NotControl = true, Text = "0/0" }; //Breezer - New Labels CritRLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 146), NotControl = true }; CritDLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 164), NotControl = true }; AttkSpdLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 182), NotControl = true }; AccLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 200), NotControl = true }; AgilLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 218), NotControl = true }; LuckLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(126, 236), NotControl = true }; // STATS II ExpPLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 20), NotControl = true, Text = "0-0", }; BagWLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 38), NotControl = true, Text = "0-0", }; WearWLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 56), NotControl = true, Text = "0-0", }; HandWLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 74), NotControl = true, Text = "0-0", }; MagicRLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 92), NotControl = true, Text = "0-0" }; PoisonResLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 110), NotControl = true, Text = "0/0" }; HealthRLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 128), NotControl = true, Text = "0/0" }; //Breezer ManaRLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 146), NotControl = true }; PoisonRecLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 164), NotControl = true }; HolyTLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 182), NotControl = true }; FreezeLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 200), NotControl = true }; PoisonAtkLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(126, 218), NotControl = true }; Magics = new MagicButton[7]; for (int i = 0; i < Magics.Length; i++) { Magics[i] = new MagicButton { Parent = SkillPage, Visible = false, Location = new Point(8, 8 + i * 33) } } ; NextButton = new MirButton { Index = 396, Location = new Point(140, 250), Library = Libraries.Prguse, Parent = SkillPage, PressedIndex = 397, Sound = SoundList.ButtonA, }; NextButton.Click += (o, e) => { if (StartIndex + 7 >= MapObject.User.Magics.Count) { return; } StartIndex += 7; RefreshInterface(); ClearCoolDowns(); }; BackButton = new MirButton { Index = 398, Location = new Point(90, 250), Library = Libraries.Prguse, Parent = SkillPage, PressedIndex = 399, Sound = SoundList.ButtonA, }; BackButton.Click += (o, e) => { if (StartIndex - 7 < 0) { return; } StartIndex -= 7; RefreshInterface(); ClearCoolDowns(); }; }
public HeroInventoryDialog() { Index = 1422; Library = Libraries.Prguse; Movable = true; Sort = true; Visible = false; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(299, 2), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); Grid = new MirItemCell[8 * 5]; for (int x = 0; x < 8; x++) { for (int y = 0; y < 5; y++) { int idx = 8 * y + x; Grid[idx] = new MirItemCell { ItemSlot = 2 + idx, GridType = MirGridType.HeroInventory, Library = Libraries.Items, Parent = this, Location = new Point(x * 36 + 14 + x, y % 5 * 32 + 23 + y % 5), }; if (idx >= 40) { Grid[idx].Visible = false; } } } for (int i = 0; i < LockBar.Length; i++) { LockBar[i] = new MirImageControl { Index = 1423, Library = Libraries.Prguse, Location = new Point(14, 56 + i * 33), Parent = this, DrawImage = true, NotControl = true, Visible = false, }; } HPLockBar = new MirImageControl { Index = 1428, Library = Libraries.Prguse, Location = new Point(57, 196), Parent = this, DrawImage = true, NotControl = true, Visible = false, }; MPLockBar = new MirImageControl { Index = 1429, Library = Libraries.Prguse, Location = new Point(162, 196), Parent = this, DrawImage = true, NotControl = true, Visible = false, }; HPButton = new MirButton { Index = 560, HoverIndex = 561, PressedIndex = 562, Library = Libraries.Title, Location = new Point(58, Size.Height - 60), Parent = this, Size = new Size(60, 25), Sound = SoundList.ButtonA, Visible = false, }; HPButton.Click += (o1, e) => { MirAmountBox amountBox = new MirAmountBox("Enter a value", 116, 99); amountBox.OKButton.Click += (o, a) => Network.Enqueue(new C.SetAutoPotValue { Stat = Stat.HP, Value = amountBox.Amount }); amountBox.Show(); }; MPButton = new MirButton { Index = 563, HoverIndex = 564, PressedIndex = 565, Library = Libraries.Title, Location = new Point(206, Size.Height - 60), Parent = this, Size = new Size(60, 25), Sound = SoundList.ButtonA, Visible = false, }; MPButton.Click += (o1, e) => { MirAmountBox amountBox = new MirAmountBox("Enter a value", 116, 99); amountBox.OKButton.Click += (o, a) => Network.Enqueue(new C.SetAutoPotValue { Stat = Stat.MP, Value = amountBox.Amount }); amountBox.Show(); }; AutoHPPercentLabel = new MirLabel { Parent = this, Location = new Point(HPButton.Location.X, HPButton.Location.Y + 27), AutoSize = false, Size = new Size(60, 25), DrawFormat = TextFormatFlags.HorizontalCenter, Visible = false }; AutoMPPercentLabel = new MirLabel { Parent = this, Location = new Point(MPButton.Location.X, MPButton.Location.Y + 27), AutoSize = false, Size = new Size(60, 25), DrawFormat = TextFormatFlags.HorizontalCenter, Visible = false }; HPItem = new MirItemCell { ItemSlot = 0, GridType = MirGridType.HeroHPItem, Library = Libraries.Items, Parent = this, Location = new Point(HPButton.Location.X + 64, HPButton.Location.Y + 5), Visible = false }; MPItem = new MirItemCell { ItemSlot = 0, GridType = MirGridType.HeroMPItem, Library = Libraries.Items, Parent = this, Location = new Point(MPButton.Location.X - 40, MPButton.Location.Y + 5), Visible = false }; RefreshInterface(); }