public CharacterDialog() { Index = 504; Library = Libraries.Title; Location = new Point(Settings.ScreenWidth - 264, 0); Movable = true; Sort = true; BeforeDraw += (o, e) => RefreshInferface(); 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 { 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); StatuspageDataLabel.Text = string.Format("{0}\n{1}", MapObject.User.CriticalRate, MapObject.User.CriticalDamage); }; StatePage = new MirImageControl { Index = 507, Parent = this, Library = Libraries.Title, Location = new Point(8, 90), Visible = false }; StatePage.BeforeDraw += (o, e) => { StatLabel.Text = string.Format("{0:#0.##%}\n{1}/{2}\n{3}/{4}\n{5}/{6}\n{7}\n{8}\n+{9}\n+{10}\n+{11}\n+{12}\n+{13}\n+{14}\n+{15}\n+{16}\n+{17}\n+{18}", MapObject.User.Experience / (double)MapObject.User.MaxExperience, MapObject.User.CurrentBagWeight, MapObject.User.MaxBagWeight, MapObject.User.CurrentWearWeight, MapObject.User.MaxWearWeight, MapObject.User.CurrentHandWeight, MapObject.User.MaxHandWeight, MapObject.User.Accuracy, MapObject.User.Agility, MapObject.User.Luck, MapObject.User.ASpeed, MapObject.User.MagicResist, MapObject.User.PoisonResist, MapObject.User.HealthRecovery, MapObject.User.SpellRecovery, MapObject.User.PoisonRecovery, MapObject.User.Holy, MapObject.User.Freezing, 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(50, 12), Size = new Size(190, 20), NotControl = true, }; GuildLabel = new MirLabel { DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, Location = new Point(50, 33), Size = new Size(190, 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(125, 7), }; Grid[(int)EquipmentSlot.Armour] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Armour, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(164, 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, 241), }; Grid[(int)EquipmentSlot.Boots] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Boots, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(47, 241), }; Grid[(int)EquipmentSlot.Belt] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Belt, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(86, 241), }; Grid[(int)EquipmentSlot.Stone] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Stone, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(125, 241), }; Grid[(int)EquipmentSlot.Mount] = new MirItemCell { ItemSlot = (int)EquipmentSlot.Mount, GridType = MirGridType.Equipment, Parent = CharacterPage, Location = new Point(203, 62), }; ACLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 63), NotControl = true, Text = "0-0" }; MACLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 90), NotControl = true, Text = "0-0" }; DCLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 117), NotControl = true, Text = "0-0" }; MCLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 144), NotControl = true, Text = "0-0" }; SCLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 171), NotControl = true, Text = "0-0" }; HealthLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 198), NotControl = true, Text = "0/0" }; ManaLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 222), NotControl = true, Text = "0/0" }; StatuspageHeaderLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(20, 238), NotControl = true, Text = "Critical Rate\nCritical Damage" }; StatuspageDataLabel = new MirLabel { AutoSize = true, Parent = StatusPage, Location = new Point(105, 238), NotControl = true }; HeadingLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(10, 59), NotControl = true, Text = "Experience\nBag Weight\nWear Weight\nHand Weight\nAccuracy\nAgility\nLuck\nAttack Speed\nMagicResist\nPoisonResist\nHealthRecovery\nManaRecovery\nPoisonRecovery\nHoly\nFreezing\nPoisonAttack" }; StatLabel = new MirLabel { AutoSize = true, Parent = StatePage, Location = new Point(120, 59), NotControl = true, }; Magics = new MagicButton[6]; for (int i = 0; i < Magics.Length; i++) Magics[i] = new MagicButton { Parent = SkillPage, Visible = false, Location = new Point(8, 40 + 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 + 6 >= MapObject.User.Magics.Count) return; StartIndex += 6; RefreshInferface(); }; 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 - 6 < 0) return; StartIndex -= 6; RefreshInferface(); }; }
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 { 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:0.##%}", 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(); }; }
MagicButton GetEditorShortcut(int index, Property property) { MagicButton result = new MagicButton() { //Location = new Point(ModuleControls[index].Width + 8, 0), Anchor = AnchorStyles.Left, EditorToOpen = property.EditorShortcut }; switch (property.ControlType) { case PropertyType.BOOL: ((CheckBox)ModuleControls[index]).CheckedChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = 0; }; break; case PropertyType.TEXT: ((TextBox)ModuleControls[index]).TextChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = 0; }; break; case PropertyType.HEXT: ((HexBox)ModuleControls[index]).TextChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = Util.BytesToUInt(((HexBox)ModuleControls[index]).Value, true); }; break; case PropertyType.HEXU: case PropertyType.NUMU: ((NumericUpDown)ModuleControls[index]).ValueChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = (uint)((NumericUpDown)ModuleControls[index]).Value; }; break; case PropertyType.NUMS: ((NumericUpDown)ModuleControls[index]).ValueChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = (uint)((NumericUpDown)ModuleControls[index]).Value; }; break; case PropertyType.LIST: if (property.FileName == null) { ((ByteBox)ModuleControls[index]).ValueChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = ((ByteBox)ModuleControls[index]).Value; } } ; else { ((ByteArrayBox)ModuleControls[index]).ValueChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = ((ByteArrayBox)ModuleControls[index]).Value; } }; break; case PropertyType.POIN: if (property.FileName == null) { ((PointerBox)ModuleControls[index]).ValueChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = ((PointerBox)ModuleControls[index]).Value; } } ; else { ((PointerArrayBox)ModuleControls[index]).ValueChanged += delegate(object sender, EventArgs e) { result.EntryToSelect = ((PointerArrayBox)ModuleControls[index]).Value; } }; break; default: break; } return(result); }