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(); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!disposing) { return; } Label = null; OKButton = null; CancelButton = null; NoButton = null; YesButton = null; Buttons = 0; for (int i = 0; i < Program.Form.Controls.Count; i++) { TextBox T = (TextBox)Program.Form.Controls[i]; if (T != null && T.Tag != null) { ((MirTextBox)T.Tag).DialogChanged(); } } }
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 ReportDialog() { Index = 1633; Library = Libraries.Prguse; Movable = true; Sort = true; Location = Center; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(336, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); ReportType = new MirDropDownBox() { Parent = this, Location = new Point(12, 35), Size = new Size(170, 14), ForeColour = Color.White, Visible = true, Enabled = true, }; ReportType.Items.Add("Select Report Type."); ReportType.Items.Add("Submit Bug"); ReportType.Items.Add("Report Player"); MessageArea = new MirTextBox { Parent = this, Location = new Point(12, 57), Size = new Size(330, 150), Font = new Font(Settings.FontName, 8F), }; MessageArea.MultiLine(); SendButton = new MirButton { Parent = this, Library = Libraries.Title, Index = 607, HoverIndex = 608, PressedIndex = 609, Sound = SoundList.ButtonA, Location = new Point(260, 219) }; SendButton.Click += SendButton_Click; }
public MirInputBox(string Message) { Modal = true; Movable = false; Window = new MirImageControl { Index = 660, Library = Libraries.Prguse, Parent = this }; Location = new Point((Settings.ScreenSize.Width - Window.Size.Width) / 2, (Settings.ScreenSize.Height - Window.Size.Height) / 2); new MirLabel { DrawFormat = DrawTextFormat.WordBreak, Location = new Point(25, 25), Size = new Size(235, 40), Parent = Window, Text = Message, }; InputTextBox = new MirTextBox { Parent = Window, Border = true, BorderColor = Color.Lime, Location = new Point(23, 86), Size = new Size(240, 19), }; InputTextBox.SetFocus(); InputTextBox.TextBox.KeyPress += new KeyPressEventHandler(MirInputBox_KeyPress); OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(60, 123), Parent = Window, PressedIndex = 202, }; CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(160, 123), Parent = Window, PressedIndex = 205, }; CancelButton.Click += new EventHandler(DisposeDialog); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!disposing) { return; } if (_label != null && !_label.IsDisposed) { _label.Dispose(); } _label = null; if (_DropDownButton != null && !_DropDownButton.IsDisposed) { _DropDownButton.Dispose(); } _DropDownButton = null; if (_ScrollBar != null && !_ScrollBar.IsDisposed) { _ScrollBar.Dispose(); } _ScrollBar = null; if (_ScrollDown != null && !_ScrollDown.IsDisposed) { _ScrollDown.Dispose(); } _ScrollDown = null; if (_ScrollPosition != null && !_ScrollPosition.IsDisposed) { _ScrollPosition.Dispose(); } _ScrollPosition = null; if (_ScrollUp != null && !_ScrollUp.IsDisposed) { _ScrollUp.Dispose(); } _ScrollUp = null; for (int i = 0; i < _Option.Length; i++) { if (_Option[i] != null && !_Option[i].IsDisposed) { _Option[i].Dispose(); } _Option[i] = null; } }
public MirInputBox(string message) { Modal = true; Movable = false; Index = 660; Library = Libraries.CustomPrguse; Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2); CaptionLabel = new MirLabel { DrawFormat = TextFormatFlags.WordBreak, Location = new Point(25, 25), Size = new Size(235, 40), Parent = this, Text = message, }; InputTextBox = new MirTextBox { Parent = this, Border = true, BorderColour = Color.Lime, Location = new Point(23, 86), Size = new Size(240, 19), MaxLength = 50, }; InputTextBox.SetFocus(); InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress; OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.CustomTitle, Location = new Point(60, 123), Parent = this, PressedIndex = 202, }; CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.CustomTitle, Location = new Point(160, 123), Parent = this, PressedIndex = 205, }; CancelButton.Click += DisposeDialog; }
public MirInputBox(string message) { Modal = true; Movable = false; Index = 660; Library = Libraries.Prguse; Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2); CaptionLabel = new MirLabel { DrawFormat = TextFormatFlags.WordBreak, Location = new Point(25, 25), Size = new Size(235, 40), Parent = this, Text = message, }; InputTextBox = new MirTextBox { Parent = this, Border = true, BorderColour = Color.Lime, Location = new Point(23, 86), Size = new Size(240, 19), MaxLength = 50, }; InputTextBox.SetFocus(); InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress; OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(60, 123), Parent = this, PressedIndex = 202, }; CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(160, 123), Parent = this, PressedIndex = 205, }; CancelButton.Click += DisposeDialog; }
public void MenuNameChanged() { _MenuBtn = new MirButton { Index = 73, Parent = this, Visible = true, Text = _MenuName, Library = Libraries.GameUI, Location = new Point(0, 0) }; _MenuBtn.Click += (o, e) => { _ClickBtnIndex = 0; if (_Option[0] != null && _Option[0].IsDisposed) { MouseClick(_Option[0].Visible); } }; }
public void ItemsChanged() { _Option = new MirButton[_Items.Count]; for (int i = 0; i < _Items.Count; i++) { _Option[i] = new MirButton { Index = 74, Parent = this, Visible = false, Text = _Items[i], Library = Libraries.GameUI, Location = new Point(0, 0) }; _Option[i].Click += (o, e) => { _ClickBtnIndex = i + 1; MouseClick(false); }; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!disposing) { return; } if (_MenuBtn != null && !_MenuBtn.IsDisposed) { _MenuBtn.Dispose(); } _MenuBtn = null; for (int i = 0; i < _Option.Length; i++) { if (_Option[i] != null && !_Option[i].IsDisposed) { _Option[i].Dispose(); } _Option[i] = null; } }
public MirMessageBox(string message, MirMessageBoxButtons b = MirMessageBoxButtons.OK, bool allowKeys = true) { DrawImage = true; ForeColour = Color.White; Buttons = b; Modal = true; Movable = false; AllowKeyPress = allowKeys; Index = 360; Library = Libraries.Prguse; Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2); Label = new MirLabel { AutoSize = false, // DrawFormat = StringFormatFlags.FitBlackBox, Location = new Point(35, 35), Size = new Size(390, 110), Parent = this, Text = message }; switch (Buttons) { case MirMessageBoxButtons.OK: OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(360, 157), Parent = this, PressedIndex = 202, }; OKButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons.OKCancel: OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(260, 157), Parent = this, PressedIndex = 202, }; OKButton.Click += (o, e) => Dispose(); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(360, 157), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons.YesNo: YesButton = new MirButton { HoverIndex = 207, Index = 206, Library = Libraries.Title, Location = new Point(260, 157), Parent = this, PressedIndex = 208, }; YesButton.Click += (o, e) => Dispose(); NoButton = new MirButton { HoverIndex = 211, Index = 210, Library = Libraries.Title, Location = new Point(360, 157), Parent = this, PressedIndex = 212, }; NoButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons.YesNoCancel: YesButton = new MirButton { HoverIndex = 207, Index = 206, Library = Libraries.Title, Location = new Point(160, 157), Parent = this, PressedIndex = 208, }; YesButton.Click += (o, e) => Dispose(); NoButton = new MirButton { HoverIndex = 211, Index = 210, Library = Libraries.Title, Location = new Point(260, 157), Parent = this, PressedIndex = 212, }; NoButton.Click += (o, e) => Dispose(); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(360, 157), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons.Cancel: CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(360, 157), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); break; } }
public MemoDialog() { Index = 209; Library = Libraries.Title; Movable = true; Sort = true; Location = Center; MemoTextBox = new MirTextBox { ForeColour = Color.White, Parent = this, Font = new Font(Settings.FontName, 8F), Location = new Point(15, 30), Size = new Size(165, 100), }; MemoTextBox.MultiLine(); OKButton = new MirButton { Index = 382, HoverIndex = 383, PressedIndex = 384, Parent = this, Library = Libraries.Title, Sound = SoundList.ButtonA, Location = new Point(30, 133) }; OKButton.Click += (o, e) => { Network.Enqueue(new C.AddMemo { CharacterIndex = Friend.Index, Memo = MemoTextBox.Text }); Hide(); }; CancelButton = new MirButton { Index = 385, HoverIndex = 386, PressedIndex = 387, Parent = this, Library = Libraries.Title, Sound = SoundList.ButtonA, Location = new Point(115, 133) }; CancelButton.Click += (o, e) => Hide(); #region Buttons CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(168, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); #endregion }
public MirMessageBox(string Message, MessageBoxButtons B = MessageBoxButtons.OK) { Buttons = B; Modal = true; Movable = false; Window = new MirImageControl { Index = 360, Library = Libraries.Prguse, Parent = this }; Location = new Point((Settings.ScreenSize.Width - Window.Size.Width) / 2, (Settings.ScreenSize.Height - Window.Size.Height) / 2); new MirLabel { AutoSize = false, DrawFormat = DrawTextFormat.WordBreak, Location = new Point(35, 35), Size = new Size(390, 110), Parent = Window, Text = Message }; switch (Buttons) { case MessageBoxButtons.OK: OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(360, 157), Parent = Window, PressedIndex = 202, }; OKButton.Click += new EventHandler(DisposeDialog); break; case MessageBoxButtons.OKCancel: OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(260, 157), Parent = Window, PressedIndex = 202, }; OKButton.Click += new EventHandler(DisposeDialog); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(360, 157), Parent = Window, PressedIndex = 205, }; CancelButton.Click += new EventHandler(DisposeDialog); break; case MessageBoxButtons.YesNo: YesButton = new MirButton { HoverIndex = 207, Index = 206, Library = Libraries.Title, Location = new Point(260, 157), Parent = Window, PressedIndex = 208, }; YesButton.Click += new EventHandler(DisposeDialog); NoButton = new MirButton { HoverIndex = 211, Index = 210, Library = Libraries.Title, Location = new Point(360, 157), Parent = Window, PressedIndex = 212, }; NoButton.Click += new EventHandler(DisposeDialog); break; case MessageBoxButtons.YesNoCancel: YesButton = new MirButton { HoverIndex = 207, Index = 206, Library = Libraries.Title, Location = new Point(160, 157), Parent = Window, PressedIndex = 208, }; YesButton.Click += new EventHandler(DisposeDialog); NoButton = new MirButton { HoverIndex = 211, Index = 210, Library = Libraries.Title, Location = new Point(260, 157), Parent = Window, PressedIndex = 212, }; NoButton.Click += new EventHandler(DisposeDialog); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(360, 157), Parent = Window, PressedIndex = 205, }; CancelButton.Click += new EventHandler(DisposeDialog); break; } }
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 QuestDetailDialog() { Index = 960; Library = Libraries.Prguse; Movable = true; Sort = true; Location = new Point(Settings.ScreenWidth / 2 + 20, 60); MirImageControl TitleLabel = new MirImageControl { Index = 16, Library = Libraries.Title, Location = new Point(18, 5), Parent = this }; #region Message Area MirButton upButton = new MirButton { Index = 197, HoverIndex = 198, PressedIndex = 199, Library = Libraries.Prguse2, Parent = this, Size = new Size(16, 14), Location = new Point(293, 33), Sound = SoundList.ButtonA, Visible = true }; MirButton downButton = new MirButton { Index = 207, HoverIndex = 208, Library = Libraries.Prguse2, PressedIndex = 209, Parent = this, Size = new Size(16, 14), Location = new Point(293, 280), Sound = SoundList.ButtonA, Visible = true }; MirButton positionBar = new MirButton { Index = 205, HoverIndex = 206, PressedIndex = 206, Library = Libraries.Prguse2, Location = new Point(293, 48), Parent = this, Movable = true, Sound = SoundList.None, Visible = false }; Message = new QuestMessage(upButton, downButton, positionBar, 16, true) { Font = new Font(Settings.FontName, 9F), Parent = this, Size = new Size(280, 320), Location = new Point(10, 35), PosMinY = 46, PosMaxY = 261 }; #endregion #region Rewards Reward = new QuestRewards { Parent = this, Size = new Size(315, 130), Location = new Point(5, 307) }; #endregion #region Buttons _shareButton = new MirButton { Index = 616, HoverIndex = 617, PressedIndex = 618, Library = Libraries.Title, Parent = this, Location = new Point(40, 437), Sound = SoundList.ButtonA }; _shareButton.Click += (o, e) => { Network.Enqueue(new C.ShareQuest { QuestIndex = Quest.Id }); }; _pauseButton = new MirButton { Index = 270, HoverIndex = 271, PressedIndex = 272, Library = Libraries.Title, Parent = this, Location = new Point(120, 437), Sound = SoundList.ButtonA, Visible = false }; _cancelButton = new MirButton { Index = 203, HoverIndex = 204, PressedIndex = 205, Library = Libraries.Title, Parent = this, Location = new Point(200, 437), Sound = SoundList.ButtonA, }; _cancelButton.Click += (o, e) => { MirMessageBox messageBox = new MirMessageBox("Are you sure you want to cancel this quest?", MirMessageBoxButtons.YesNo); messageBox.YesButton.Click += (o1, a) => { Network.Enqueue(new C.AbandonQuest { QuestIndex = Quest.Id }); Hide(); }; messageBox.Show(); }; #endregion MirButton closeButton = new MirButton { Index = 360, HoverIndex = 361, PressedIndex = 362, Library = Libraries.Prguse2, Parent = this, Location = new Point(289, 3), Sound = SoundList.ButtonA, }; closeButton.Click += (o, e) => Hide(); //MirButton helpButton = new MirButton //{ // Index = 257, // HoverIndex = 258, // PressedIndex = 259, // Library = Libraries.Prguse2, // Parent = this, // Location = new Point(266, 3), // Sound = SoundList.ButtonA, //}; //helpButton.Click += (o, e) => GameScene.Scene.HelpDialog.DisplayPage("Quests"); }
public QuestGroupQuestItem(string group, List<ClientQuestProgress> quests, bool expanded) { Group = group; Quests = quests; Expanded = expanded; _expandButton = new MirButton { Index = Expanded ? 917 : 918, Library = Libraries.Prguse, Parent = this, Size = new Size(16, 14), Location = new Point(0, 0), Sound = SoundList.ButtonA }; _expandButton.Click += (o, e) => ChangeExpand(); _groupLabel = new MirLabel { Text = Group, AutoSize = true, Parent = this, Font = new Font(Settings.FontName, 8F), ForeColour = Color.LimeGreen, Location = new Point(18, 0), Visible = true, }; for (int i = 0; i < Quests.Count; i++) { QuestSingleQuestItem singleQuest = new QuestSingleQuestItem(Quests[i]) { Parent = this, Location = new Point(18, (15 * (i + 1))), Size = new Size(280, 15), Visible = Expanded }; singleQuest.SelectedQuestChanged += (o, e) => OnSelectedQuestChanged(o); _tasks.Add(singleQuest); if (Expanded) SizeY += 15; } Size = new Size(280, SizeY); }
public ChatDialog() { Index = Settings.Resolution != 800 ? 2221 : 2201; Library = Libraries.Prguse; Location = new Point(GameScene.Scene.MainDialog.Location.X + 230, Settings.ScreenHeight - 97); PixelDetect = true; KeyPress += ChatPanel_KeyPress; KeyDown += ChatPanel_KeyDown; MouseWheel += ChatPanel_MouseWheel; ChatTextBox = new MirTextBox { BackColour = Color.DarkGray, ForeColour = Color.Black, Parent = this, Size = new Size(Settings.Resolution != 800 ? 627 : 403, 13), Location = new Point(1, 54), MaxLength = Globals.MaxChatLength, Visible = false, Font = ChatFont, }; ChatTextBox.TextBox.KeyPress += ChatTextBox_KeyPress; ChatTextBox.TextBox.KeyDown += ChatTextBox_KeyDown; ChatTextBox.TextBox.KeyUp += ChatTextBox_KeyUp; HomeButton = new MirButton { Index = 2018, HoverIndex = 2019, Library = Libraries.Prguse, Location = new Point(Settings.Resolution != 800 ? 618 : 394, 1), Parent = this, PressedIndex = 2020, Sound = SoundList.ButtonA, }; HomeButton.Click += (o, e) => { if (StartIndex == 0) return; StartIndex = 0; Update(); }; UpButton = new MirButton { Index = 2021, HoverIndex = 2022, Library = Libraries.Prguse, Location = new Point(Settings.Resolution != 800 ? 618 : 394, 9), Parent = this, PressedIndex = 2023, Sound = SoundList.ButtonA, }; UpButton.Click += (o, e) => { if (StartIndex == 0) return; StartIndex--; Update(); }; EndButton = new MirButton { Index = 2027, HoverIndex = 2028, Library = Libraries.Prguse, Location = new Point(Settings.Resolution != 800 ? 618 : 394, 45), Parent = this, PressedIndex = 2029, Sound = SoundList.ButtonA, }; EndButton.Click += (o, e) => { if (StartIndex == History.Count - 1) return; StartIndex = History.Count - 1; Update(); }; DownButton = new MirButton { Index = 2024, HoverIndex = 2025, Library = Libraries.Prguse, Location = new Point(Settings.Resolution != 800 ? 618 : 394, 39), Parent = this, PressedIndex = 2026, Sound = SoundList.ButtonA, }; DownButton.Click += (o, e) => { if (StartIndex == History.Count - 1) return; StartIndex++; Update(); }; CountBar = new MirImageControl { Index = 2012, Library = Libraries.Prguse, Location = new Point(Settings.Resolution != 800 ? 622 : 398, 16), Parent = this, }; PositionBar = new MirButton { Index = 2015, HoverIndex = 2016, Library = Libraries.Prguse, Location = new Point(Settings.Resolution != 800 ? 619 : 395, 16), Parent = this, PressedIndex = 2017, Movable = true, Sound = SoundList.None, }; PositionBar.OnMoving += PositionBar_OnMoving; }
public QuestMessage(MirButton scrollUpButton, MirButton scrollDownButton, MirButton positionBar, int lineCount, bool displayProgress = false) { ScrollUpButton = scrollUpButton; ScrollDownButton = scrollDownButton; PositionBar = positionBar; DisplayProgress = displayProgress; MouseWheel += QuestMessage_MouseWheel; PositionBar.OnMoving += PositionBar_OnMoving; LineCount = lineCount; _textLabel = new MirLabel[LineCount]; PosX = PositionBar.Location.X; PosMinY = PositionBar.Location.Y; PosMaxY = PositionBar.Location.Y; ScrollUpButton.Click += (o, e) => { if (TopLine <= 0) return; TopLine--; NewText(CurrentLines, false); UpdatePositionBar(); }; ScrollDownButton.Click += (o, e) => { if (TopLine + LineCount >= CurrentLines.Count) return; TopLine++; NewText(CurrentLines, false); UpdatePositionBar(); }; AfterDraw += QuestMessage_AfterDraw; }
protected override void Dispose(bool disposing) { base.Dispose(disposing); Search.Dispose(); Search = null; PageNumberLabel = null; totalGold = null; totalCredits = null; ALL = null; War = null; Sin = null; Tao = null; Wiz = null; Arch = null; allItems = null; topItems = null; Deals = null; New = null; CloseButton = null; PreviousButton = null; NextButton = null; UpButton = null; DownButton = null; PositionBar = null; Grid = null; Filters = null; FilterBackground = null; Viewer.Dispose(); CategoryList.Clear(); filteredShop.Clear(); SearchResult.Clear(); }
public MirDropDownBox() { BackColour = Color.FromArgb(0x0F, 0x0F, 0x42); ForeColour = Color.White; Enabled = false; _label = new MirLabel { Parent = this, Location = new Point(0, 0), ForeColour = ForeColour, BackColour = BackColour, Font = new Font(Settings.FontName, 7F), Visible = true, }; _label.Click += (o, e) => { if (_DropDownButton.Enabled) { DropDownClick(); } }; _label.BeforeDraw += (o, e) => { if ((Items.Count > 0) && (Items.Count >= SelectedIndex)) { if (SelectedIndex == -1) { _label.Text = " "; } else { _label.Text = Items[SelectedIndex]; } } else { _label.Text = "None"; } }; for (int i = 0; i < _Option.Length; i++) { _Option[i] = new MirLabel { Parent = this, Visible = false, Location = new Point(0, 15 + (i * 13)), ForeColour = ForeColour, BackColour = Color.MidnightBlue, Font = new Font(Settings.FontName, 7F) }; int index = i; _Option[index].MouseEnter += (o, e) => _Option[index].BackColour = Color.Blue; _Option[index].MouseLeave += (o, e) => _Option[index].BackColour = Color.MidnightBlue; _Option[index].MouseDown += (o, e) => _Option[index].BackColour = Color.MidnightBlue; _Option[index].MouseUp += (o, e) => _Option[index].BackColour = Color.MidnightBlue; _Option[index].Click += (o, e) => SelectOption(index); _Option[index].BeforeDraw += (o, e) => { if (Items.Count > (ScrollIndex + index + MinimumOption)) { _Option[index].Text = _Items[ScrollIndex + index + MinimumOption]; } }; } _DropDownButton = new MirButton { Index = 314, Library = Libraries.Prguse, Location = new Point(Size.Width - 16, 0), Parent = this, PressedIndex = 315, Visible = false, }; _DropDownButton.Click += (o, e) => DropDownClick(); _ScrollUp = new MirButton { HoverIndex = 2022, Index = 2021, Library = Libraries.Prguse, Location = new Point(Size.Width - 12, 14), Parent = this, PressedIndex = 2023, Visible = false }; _ScrollUp.Click += (o, e) => ScrollUp(); _ScrollDown = new MirButton { HoverIndex = 2025, Index = 2024, Library = Libraries.Prguse, Location = new Point(Size.Width - 12, 52), Parent = this, PressedIndex = 2026, Visible = false }; _ScrollDown.Click += (o, e) => ScrollDown(); _ScrollBar = new MirImageControl { Index = 2012, Library = Libraries.Prguse, Location = new Point(Size.Width - 8, 22), Parent = this, Visible = false }; _ScrollPosition = new MirButton { HoverIndex = 2016, Index = 2015, Library = Libraries.Prguse, Location = new Point(Size.Width - 11, 22), Movable = true, Parent = this, PressedIndex = 2017, Visible = false }; _ScrollPosition.OnMoving += ScrollPosition; BeforeDraw += MirDropDownBox_BeforeDraw; }
public IntelligentCreatureOptionsGradeDialog() { Index = 237; Library = Libraries.Prguse; Movable = false; Sort = true; Location = new Point(GameScene.Scene.IntelligentCreatureDialog.Location.X + locationOffset.X, GameScene.Scene.IntelligentCreatureDialog.Location.Y + locationOffset.Y); BeforeDraw += IntelligentCreatureOptionsGradeDialog_BeforeDraw; NextButton = new MirButton() { HoverIndex = 396, Index = 396, Location = new Point(96, 5), Library = Libraries.Prguse, Parent = this, PressedIndex = 397, Sound = SoundList.ButtonA, }; NextButton.Click += Button_Click; PrevButton = new MirButton() { HoverIndex = 398, Index = 398, Location = new Point(76, 5), Library = Libraries.Prguse, Parent = this, PressedIndex = 399, Sound = SoundList.ButtonA, }; PrevButton.Click += Button_Click; GradeLabel = new MirLabel() { Parent = this, Location = new Point(8, 0), DrawFormat = TextFormatFlags.VerticalCenter, Size = new Size(70, 21), NotControl = true, }; }
public MirAmountBox(string title, int image, string message) { ImageIndex = image; Modal = true; Movable = false; Index = 238; Library = Libraries.CustomPrguse; Location = new Point((800 - Size.Width) / 2, (600 - Size.Height) / 2); TitleLabel = new MirLabel { AutoSize = true, Location = new Point(19, 8), Parent = this, NotControl = true, Text = title }; TextLabel = new MirLabel { AutoSize = true, Location = new Point(60, 43), ForeColour = Color.Yellow, Parent = this, NotControl = true, Text = message }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(180, 3), Library = Libraries.CustomPrguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Dispose(); ItemImage = new MirControl { Location = new Point(15, 34), Size = new Size(38, 34), Parent = this, }; ItemImage.AfterDraw += (o, e) => DrawItem(); OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.CustomTitle, Location = new Point(23, 76), Parent = this, PressedIndex = 202, }; OKButton.Click += (o, e) => Dispose(); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.CustomTitle, Location = new Point(110, 76), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); }
public MirAmountBox(string title, int image, uint max, uint min = 0, uint defaultAmount = 0) { ImageIndex = image; MaxAmount = max; MinAmount = min; Amount = max; Modal = true; Movable = false; Index = 238; Library = Libraries.CustomPrguse; Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2); TitleLabel = new MirLabel { AutoSize = true, Location = new Point(19, 8), Parent = this, NotControl = true, Text = title }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(180, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Dispose(); ItemImage = new MirControl { Location = new Point(15, 34), Size = new Size(38, 34), Parent = this, }; ItemImage.AfterDraw += (o, e) => DrawItem(); OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.CustomTitle, Location = new Point(23, 76), Parent = this, PressedIndex = 202, }; OKButton.Click += (o, e) => Dispose(); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.CustomTitle, Location = new Point(110, 76), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); InputTextBox = new MirTextBox { Parent = this, Border = true, BorderColour = Color.Lime, Location = new Point(58, 43), Size = new Size(132, 19), }; InputTextBox.SetFocus(); InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress; InputTextBox.TextBox.TextChanged += TextBox_TextChanged; InputTextBox.Text = (defaultAmount > 0 && defaultAmount <= MaxAmount) ? defaultAmount.ToString() : MaxAmount.ToString(); InputTextBox.TextBox.SelectionStart = 0; InputTextBox.TextBox.SelectionLength = InputTextBox.Text.Length; }
public FriendDialog() { Index = 199; Library = Libraries.Title; Movable = true; Sort = true; Location = Center; AfterDraw += FriendDialog_BeforeDraw; TitleLabel = new MirImageControl { Index = 6, Library = Libraries.Title, Location = new Point(18, 4), Parent = this }; FriendLabel = new MirImageControl { Index = 163, Library = Libraries.Title, Location = new Point(10, 34), Parent = this, Sound = SoundList.ButtonA, }; FriendLabel.Click += (o, e) => { _tempBlockedTab = false; }; BlacklistLabel = new MirImageControl { Index = 167, Library = Libraries.Title, Location = new Point(128, 34), Parent = this, Sound = SoundList.ButtonA, }; BlacklistLabel.Click += (o, e) => { _tempBlockedTab = true; }; PageNumberLabel = new MirLabel { Text = "", Parent = this, Size = new Size(83, 17), Location = new Point(87, 216), DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter }; #region Buttons PreviousButton = new MirButton { Index = 240, HoverIndex = 241, PressedIndex = 242, Library = Libraries.Prguse2, Parent = this, Size = new Size(16, 16), Location = new Point(70, 218), Sound = SoundList.ButtonA, }; PreviousButton.Click += (o, e) => { Page--; if (Page < 0) Page = 0; StartIndex = Rows.Length * Page; Update(); }; NextButton = new MirButton { Index = 243, HoverIndex = 244, PressedIndex = 245, Library = Libraries.Prguse2, Parent = this, Size = new Size(16, 16), Location = new Point(171, 218), Sound = SoundList.ButtonA, }; NextButton.Click += (o, e) => { Page++; if (Page > Friends.Count() / Rows.Length) Page = Friends.Count() / Rows.Length; StartIndex = Rows.Length * Page; Update(); }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(237, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); AddButton = new MirButton { Index = 554, HoverIndex = 555, PressedIndex = 556, Library = Libraries.Prguse, Location = new Point(60, 241), Parent = this, Sound = SoundList.ButtonA }; AddButton.Click += (o, e) => { ; string message = string.Format("Please enter the name of the person you would like to {0}.", _blockedTab ? "block" : "add"); MirInputBox inputBox = new MirInputBox(message); inputBox.OKButton.Click += (o1, e1) => { Network.Enqueue(new C.AddFriend { Name = inputBox.InputTextBox.Text, Blocked = _blockedTab }); inputBox.Dispose(); }; inputBox.Show(); }; RemoveButton = new MirButton { Index = 557, HoverIndex = 558, PressedIndex = 559, Library = Libraries.Prguse, Location = new Point(88, 241), Parent = this, Sound = SoundList.ButtonA }; RemoveButton.Click += (o, e) => { if (SelectedFriend == null) return; MirMessageBox messageBox = new MirMessageBox(string.Format("Are you sure you wish to remove '{0}'?", SelectedFriend.Name), MirMessageBoxButtons.YesNo); messageBox.YesButton.Click += (o1, e1) => { Network.Enqueue(new C.RemoveFriend { CharacterIndex = SelectedFriend.Index }); messageBox.Dispose(); }; messageBox.Show(); }; MemoButton = new MirButton { Index = 560, HoverIndex = 561, PressedIndex = 562, Library = Libraries.Prguse, Location = new Point(116, 241), Parent = this, Sound = SoundList.ButtonA }; MemoButton.Click += (o, e) => { if (SelectedFriend == null) return; GameScene.Scene.MemoDialog.Friend = SelectedFriend; GameScene.Scene.MemoDialog.Show(); }; EmailButton = new MirButton { Index = 563, HoverIndex = 564, PressedIndex = 565, Library = Libraries.Prguse, Location = new Point(144, 241), Parent = this, Sound = SoundList.ButtonA }; EmailButton.Click += (o, e) => { if (SelectedFriend == null) return; GameScene.Scene.MailComposeLetterDialog.ComposeMail(SelectedFriend.Name); }; WhisperButton = new MirButton { Index = 566, HoverIndex = 567, PressedIndex = 568, Library = Libraries.Prguse, Location = new Point(172, 241), Parent = this, Sound = SoundList.ButtonA }; WhisperButton.Click += (o, e) => { if (SelectedFriend == null) return; if (!SelectedFriend.Online) { GameScene.Scene.ChatDialog.ReceiveChat("Player is not online", ChatType.System); return; } GameScene.Scene.ChatDialog.ChatTextBox.SetFocus(); GameScene.Scene.ChatDialog.ChatTextBox.Text = "/" + SelectedFriend.Name + " "; GameScene.Scene.ChatDialog.ChatTextBox.Visible = true; GameScene.Scene.ChatDialog.ChatTextBox.TextBox.SelectionLength = 0; GameScene.Scene.ChatDialog.ChatTextBox.TextBox.SelectionStart = GameScene.Scene.ChatDialog.ChatTextBox.Text.Length; }; #endregion }
public MentorDialog() { Index = 170; Library = Libraries.Prguse; Movable = true; Sort = true; Location = Center; TitleLabel = new MirImageControl { Index = 51, Library = Libraries.Title, Location = new Point(18, 4), Parent = this }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(219, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); AllowButton = new MirButton { HoverIndex = 115, Index = 114, Location = new Point(30, 178), Library = Libraries.Prguse, Parent = this, PressedIndex = 116, Sound = SoundList.ButtonA, Hint = "Allow/Disallow Mentor Requests", }; AllowButton.Click += (o, e) => { if (AllowButton.Index == 116) { AllowButton.Index = 117; AllowButton.HoverIndex = 118; AllowButton.PressedIndex = 119; } else { AllowButton.Index = 114; AllowButton.HoverIndex = 115; AllowButton.PressedIndex = 116; } Network.Enqueue(new C.AllowMentor()); }; AddButton = new MirButton { HoverIndex = 214, Index = 213, Location = new Point(60, 178), Library = Libraries.Title, Parent = this, PressedIndex = 215, Sound = SoundList.ButtonA, Hint = "Add Mentor", }; AddButton.Click += (o, e) => { if (MentorLevel != 0) { GameScene.Scene.ChatDialog.ReceiveChat("You already have a Mentor.", ChatType.System); return; } string message = "Please enter the name of the person you would like to be your Mentor."; MirInputBox inputBox = new MirInputBox(message); inputBox.OKButton.Click += (o1, e1) => { Network.Enqueue(new C.AddMentor { Name = inputBox.InputTextBox.Text }); inputBox.Dispose(); }; inputBox.Show(); }; RemoveButton = new MirButton { HoverIndex = 217, Index = 216, Location = new Point(135, 178), Library = Libraries.Title, Parent = this, PressedIndex = 218, Sound = SoundList.ButtonA, Hint = "Remove Mentor/Mentee", }; RemoveButton.Click += (o, e) => { if (MentorName == "") { GameScene.Scene.ChatDialog.ReceiveChat("You don't currently have a Mentorship to cancel.", ChatType.System); return; } MirMessageBox messageBox = new MirMessageBox(string.Format("Cancelling a Mentorship early will cause a cooldown. Are you sure?"), MirMessageBoxButtons.YesNo); messageBox.YesButton.Click += (oo, ee) => Network.Enqueue(new C.CancelMentor { }); messageBox.NoButton.Click += (oo, ee) => { messageBox.Dispose(); }; messageBox.Show(); }; MentorNameLabel = new MirLabel { Location = new Point(20, 58), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; MentorLevelLabel = new MirLabel { Location = new Point(170, 58), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; MentorOnlineLabel = new MirLabel { Location = new Point(125, 58), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.Green, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 7F), Visible = false, Text = "ONLINE", }; StudentNameLabel = new MirLabel { Location = new Point(20, 112), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; StudentLevelLabel = new MirLabel { Location = new Point(170, 111), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; StudentOnlineLabel = new MirLabel { Location = new Point(125, 112), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.Green, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 7F), Visible = false, Text = "ONLINE", }; MentorLabel = new MirLabel { Location = new Point(15, 41), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.DimGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 7F), Text = "MENTOR", }; StudentLabel = new MirLabel { Location = new Point(15, 94), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.DimGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 7F), Text = "MENTEE", }; MenteeEXPLabel = new MirLabel { Location = new Point(15, 147), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.DimGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 7F), }; }
public RelationshipDialog() { Index = 583; Library = Libraries.Prguse; Movable = true; Sort = true; Location = Center; TitleLabel = new MirImageControl { Index = 52, Library = Libraries.Title, Location = new Point(18, 4), Parent = this }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(260, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); AllowButton = new MirButton { HoverIndex = 611, Index = 610, Location = new Point(50, 164), Library = Libraries.Prguse, Parent = this, PressedIndex = 612, Sound = SoundList.ButtonA, Hint = "Allow/Block Marriage" }; AllowButton.Click += (o, e) => Network.Enqueue(new C.ChangeMarriage()); RequestButton = new MirButton { HoverIndex = 601, Index = 600, Location = new Point(85, 164), Library = Libraries.Prguse, Parent = this, PressedIndex = 602, Sound = SoundList.ButtonA, Hint = "Request Marriage" }; RequestButton.Click += (o, e) => { if (LoverName != "") { GameScene.Scene.ChatDialog.ReceiveChat("You're already married.", ChatType.System); return; } Network.Enqueue(new C.MarriageRequest()); }; DivorceButton = new MirButton { HoverIndex = 617, Index = 616, Location = new Point(120, 164), Library = Libraries.Prguse, Parent = this, PressedIndex = 618, Sound = SoundList.ButtonA, Hint = "Request Divorce" }; DivorceButton.Click += (o, e) => { if (LoverName == "") { GameScene.Scene.ChatDialog.ReceiveChat("You're not married.", ChatType.System); return; } Network.Enqueue(new C.DivorceRequest()); }; MailButton = new MirButton { HoverIndex = 438, Index = 437, Location = new Point(155, 164), Library = Libraries.Prguse, Parent = this, PressedIndex = 439, Sound = SoundList.ButtonA, Hint = "Mail Lover" }; MailButton.Click += (o, e) => { if (LoverName == "") { GameScene.Scene.ChatDialog.ReceiveChat("You're not married.", ChatType.System); return; } GameScene.Scene.MailComposeLetterDialog.ComposeMail(LoverName); }; WhisperButton = new MirButton { HoverIndex = 567, Index = 566, Location = new Point(190, 164), Library = Libraries.Prguse, Parent = this, PressedIndex = 568, Sound = SoundList.ButtonA, Hint = "Whisper Lover" }; WhisperButton.Click += (o, e) => { if (LoverName == "") { GameScene.Scene.ChatDialog.ReceiveChat("You're not married.", ChatType.System); return; } if (MapName == "") { GameScene.Scene.ChatDialog.ReceiveChat("Lover is not online", ChatType.System); return; } GameScene.Scene.ChatDialog.ChatTextBox.SetFocus(); GameScene.Scene.ChatDialog.ChatTextBox.Text = ":)"; GameScene.Scene.ChatDialog.ChatTextBox.Visible = true; GameScene.Scene.ChatDialog.ChatTextBox.TextBox.SelectionLength = 0; GameScene.Scene.ChatDialog.ChatTextBox.TextBox.SelectionStart = GameScene.Scene.ChatDialog.ChatTextBox.Text.Length; }; LoverNameLabel = new MirLabel { Location = new Point(30, 40), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; LoverDateLabel = new MirLabel { Location = new Point(30, 65), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; LoverLengthLabel = new MirLabel { Location = new Point(30, 90), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; LoverOnlineLabel = new MirLabel { Location = new Point(30, 115), Size = new Size(200, 30), BackColour = Color.Empty, ForeColour = Color.LightGray, DrawFormat = TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Font = new Font(Settings.FontName, 10F), }; }
public GameShopCell() { Size = new Size(125, 146); Index = 750; Library = Libraries.CustomTitle; MouseLeave += (o, e) => { GameScene.Scene.DisposeItemLabel(); GameScene.HoverItem = null; ShowItem = null; }; nameLabel = new MirLabel { Size = new Size(125, 15), DrawFormat = TextFormatFlags.HorizontalCenter, Location = new Point(0, 13), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 8F), }; goldLabel = new MirLabel { Size = new Size(95, 20), DrawFormat = TextFormatFlags.RightToLeft | TextFormatFlags.Right, Location = new Point(2, 102), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 8F) }; gpLabel = new MirLabel { Size = new Size(95, 20), DrawFormat = TextFormatFlags.RightToLeft | TextFormatFlags.Right, Location = new Point(2, 81), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 8F) }; StockLabel = new MirLabel { Size = new Size(40, 20), Location = new Point(53, 37), Parent = this, NotControl = true, ForeColour = Color.Gray, Font = new Font(Settings.FontName, 7F), Text = "STOCK:" }; stockLabel = new MirLabel { Size = new Size(20, 20), DrawFormat = TextFormatFlags.HorizontalCenter, Location = new Point(93, 37), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 7F), }; countLabel = new MirLabel { Size = new Size(30, 20), DrawFormat = TextFormatFlags.Right, Location = new Point(16, 60), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 7F), }; BuyItem = new MirButton { Index = 778, HoverIndex = 779, PressedIndex = 780, Location = new Point(42, 122), Library = Libraries.CustomTitle, Parent = this, Sound = SoundList.ButtonA, }; BuyItem.Click += (o, e) => { BuyProduct(); }; PreviewItem = new MirButton { Index = 781, HoverIndex = 782, PressedIndex = 783, Location = new Point(8, 122), Library = Libraries.CustomTitle, Parent = this, Sound = SoundList.ButtonA, Visible = false, }; PreviewItem.Click += (o, e) => { GameScene.Scene.GameShopDialog.Viewer.Dispose(); GameScene.Scene.GameShopDialog.Viewer = new GameShopViewer { Parent = GameScene.Scene.GameShopDialog, Visible = true, Location = this.Location.X < 350 ? new Point(416, 115) : new Point(151, 115), }; GameScene.Scene.GameShopDialog.Viewer.ViewerItem = Item; GameScene.Scene.GameShopDialog.Viewer.UpdateViewer(); }; quantityUp = new MirButton { Index = 243, HoverIndex = 244, PressedIndex = 245, Library = Libraries.CustomPrguse2, Parent = this, Location = new Point(97, 56), Sound = SoundList.ButtonA, }; quantityUp.Click += (o, e) => { if (CMain.Shift) { Quantity += 10; } else { Quantity++; } if (((decimal)(Quantity * Item.Count) / Item.Info.StackSize) > 5) { Quantity = ((5 * Item.Info.StackSize) / Item.Count) > 99 ? Quantity = 99 : Quantity = (byte)((5 * Item.Info.StackSize) / Item.Count); } if (Quantity >= 99) { Quantity = 99; } if (Item.Stock != 0 && Quantity > Item.Stock) { Quantity = (byte)Item.Stock; } }; quantityDown = new MirButton { Index = 240, HoverIndex = 241, PressedIndex = 242, Library = Libraries.CustomPrguse2, Parent = this, Location = new Point(55, 56), Sound = SoundList.ButtonA, }; quantityDown.Click += (o, e) => { if (CMain.Shift) { Quantity -= 10; } else { Quantity--; } if (Quantity <= 1 || Quantity > 99) { Quantity = 1; } }; quantity = new MirLabel { Size = new Size(20, 13), DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, Location = new Point(74, 56), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 8F), }; }
public GameShopDialog() { GameScene.GameShopInfoList.Clear(); Index = 749; Library = Libraries.Title; Movable = true; Location = Center; Sort = true; Grid = new GameShopCell[4 * 2]; for (int x = 0; x < 4; x++) { for (int y = 0; y < 2; y++) { int idx = 4 * y + x; Grid[idx] = new GameShopCell { Size = new Size(125, 146), Visible = true, Parent = this, }; } } CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(671, 4), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); totalGold = new MirLabel { Size = new Size(100, 20), DrawFormat = TextFormatFlags.RightToLeft | TextFormatFlags.Right, Location = new Point(123, 449), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 8F), }; totalCredits = new MirLabel { Size = new Size(100, 20), DrawFormat = TextFormatFlags.RightToLeft | TextFormatFlags.Right, Location = new Point(5, 449), Parent = this, NotControl = true, Font = new Font(Settings.FontName, 8F) }; UpButton = new MirButton { Index = 197, HoverIndex = 198, PressedIndex = 199, Library = Libraries.Prguse2, Parent = this, Size = new Size(16, 14), Location = new Point(120, 103), Sound = SoundList.ButtonA, Visible = true }; UpButton.Click += (o, e) => { if (CStartIndex <= 0) return; CStartIndex--; SetCategories(); UpdatePositionBar(); }; DownButton = new MirButton { Index = 207, HoverIndex = 208, Library = Libraries.Prguse2, PressedIndex = 209, Parent = this, Size = new Size(16, 14), Location = new Point(120, 421), Sound = SoundList.ButtonA, Visible = true }; DownButton.Click += (o, e) => { if (CStartIndex + 22 >= CategoryList.Count) return; CStartIndex++; SetCategories(); UpdatePositionBar(); }; PositionBar = new MirButton { Index = 205, HoverIndex = 206, PressedIndex = 206, Library = Libraries.Prguse2, Location = new Point(120, 117), Parent = this, Movable = true, Sound = SoundList.None, Visible = true }; PositionBar.OnMoving += PositionBar_OnMoving; FilterBackground = new MirImageControl { Index = 769, Library = Libraries.Title, Location = new Point(11, 102), Parent = this, }; FilterBackground.MouseWheel += FilterScrolling; Search = new MirTextBox { BackColour = Color.FromArgb(4, 4, 4), ForeColour = Color.White, Parent = this, Size = new Size(140, 16), Location = new Point(540, 69), Font = new Font(Settings.FontName, 9F), MaxLength = 23, CanLoseFocus = true, }; Search.TextBox.KeyUp += (o, e) => { GetCategories(); }; allItems = new MirButton { Index = 770, Library = Libraries.Title, Location = new Point(138, 68), Visible = true, Parent = this, Sound = SoundList.ButtonA, }; allItems.Click += (o, e) => { SectionFilter = "Show All"; ResetTabs(); GetCategories(); }; topItems = new MirButton { Index = 776, Library = Libraries.Title, Location = new Point(209, 68), Visible = true, Parent = this, Sound = SoundList.ButtonA, }; topItems.Click += (o, e) => { SectionFilter = "TopItems"; ResetTabs(); GetCategories(); }; Deals = new MirButton { Index = 772, Library = Libraries.Title, Location = new Point(280, 68), Visible = true, Parent = this, Sound = SoundList.ButtonA, }; Deals.Click += (o, e) => { SectionFilter = "DealItems"; ResetTabs(); GetCategories(); }; New = new MirButton { Index = 774, Library = Libraries.Title, Location = new Point(351, 68), Visible = false, Parent = this, Sound = SoundList.ButtonA, }; New.Click += (o, e) => { SectionFilter = "NewItems"; ResetTabs(); New.Index = 775; GetCategories(); }; ALL = new MirButton { Index = 751, HoverIndex = 752, PressedIndex = 753, Library = Libraries.Title, Location = new Point(539, 37), Visible = true, Parent = this, }; ALL.Click += (o, e) => { ClassFilter = "Show All"; TypeFilter = "Show All"; GetCategories(); ResetClass(); }; War = new MirButton { Index = 754, HoverIndex = 755, PressedIndex = 756, Library = Libraries.Title, Location = new Point(568, 38), Visible = true, Parent = this, }; War.Click += (o, e) => { ClassFilter = "Warrior"; TypeFilter = "Show All"; GetCategories(); ResetClass(); }; Sin = new MirButton { Index = 757, HoverIndex = 758, PressedIndex = 759, Library = Libraries.Title, Location = new Point(591, 38), Visible = true, Parent = this, }; Sin.Click += (o, e) => { ClassFilter = "Assassin"; TypeFilter = "Show All"; GetCategories(); ResetClass(); }; Tao = new MirButton { Index = 760, HoverIndex = 761, PressedIndex = 762, Library = Libraries.Title, Location = new Point(614, 38), Visible = true, Parent = this, }; Tao.Click += (o, e) => { ClassFilter = "Taoist"; TypeFilter = "Show All"; GetCategories(); ResetClass(); }; Wiz = new MirButton { Index = 763, HoverIndex = 764, PressedIndex = 765, Library = Libraries.Title, Location = new Point(637, 38), Visible = true, Parent = this, }; Wiz.Click += (o, e) => { ClassFilter = "Wizard"; TypeFilter = "Show All"; GetCategories(); ResetClass(); }; Arch = new MirButton { Index = 766, HoverIndex = 767, PressedIndex = 768, Library = Libraries.Title, Location = new Point(660, 38), Visible = true, Parent = this, }; Arch.Click += (o, e) => { ClassFilter = "Archer"; TypeFilter = "Show All"; GetCategories(); ResetClass(); }; PageNumberLabel = new MirLabel { Text = "", Parent = this, Size = new Size(83, 17), Location = new Point(597, 446), DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, Font = new Font(Settings.FontName, 7F), }; PreviousButton = new MirButton { Index = 240, HoverIndex = 241, PressedIndex = 242, Library = Libraries.Prguse2, Parent = this, Location = new Point(600, 448), Sound = SoundList.ButtonA, }; PreviousButton.Click += (o, e) => { Page--; if (Page < 0) Page = 0; StartIndex = Grid.Length * Page; UpdateShop(); }; NextButton = new MirButton { Index = 243, HoverIndex = 244, PressedIndex = 245, Library = Libraries.Prguse2, Parent = this, Location = new Point(660, 448), Sound = SoundList.ButtonA, }; NextButton.Click += (o, e) => { Page++; if ((Page + 1) > maxPage) Page --; StartIndex = Grid.Length * Page; UpdateShop(); }; for (int i = 0; i < Filters.Length; i++) { Filters[i] = new MirLabel { Parent = this, Size = new Size(90, 20), Location = new Point(15, 103 + (15 * i)), Text = "Testing - " + i.ToString(), ForeColour = Color.Gray, Font = new Font(Settings.FontName, 7F), }; Filters[i].Click += (o, e) => { MirLabel lab = (MirLabel)o; TypeFilter = lab.Text; Page = 0; StartIndex = 0; UpdateShop(); for (int p = 0; p < Filters.Length; p++) { if (Filters[p].Text == lab.Text) Filters[p].ForeColour = Color.FromArgb(230, 200, 160); else Filters[p].ForeColour = Color.Gray; } }; Filters[i].MouseEnter += (o, e) => { MirLabel lab = (MirLabel)o; for (int p = 0; p < Filters.Length; p++) { if (Filters[p].Text == lab.Text && Filters[p].ForeColour != Color.FromArgb(230, 200, 160)) Filters[p].ForeColour = Color.FromArgb(160, 140, 110); } }; Filters[i].MouseLeave += (o, e) => { MirLabel lab = (MirLabel)o; for (int p = 0; p < Filters.Length; p++) { if (Filters[p].Text == lab.Text && Filters[p].ForeColour != Color.FromArgb(230, 200, 160)) Filters[p].ForeColour = Color.Gray; } }; Filters[i].MouseWheel += FilterScrolling; } Viewer = new GameShopViewer(); }
public GameShopViewer() { Index = 785; // 314; Library = Libraries.Title; // Libraries.Prguse2; Location = new Point(405, 108); BeforeDraw += GameShopViewer_BeforeDraw; //Click += (o, e) => //{ //Visible = false; //}; CloseButton = new MirButton { HoverIndex = 362, Index = 361, Location = new Point(230, 8), Library = Libraries.CustomPrguse, Parent = this, PressedIndex = 363, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => { Visible = false; }; WeaponImage = new MirAnimatedControl { Animated = false, Location = new Point(105, 160), AnimationCount = 6, AnimationDelay = 150, Index = 0, Library = Libraries.CustomPrguse, Loop = true, Parent = this, UseOffSet = true, NotControl = true, }; WeaponImage2 = new MirAnimatedControl { Animated = false, Location = new Point(105, 160), AnimationCount = 6, AnimationDelay = 150, Index = 0, Library = Libraries.Prguse, Loop = true, Parent = this, UseOffSet = true, NotControl = true, }; MountImage = new MirAnimatedControl { Animated = false, Location = new Point(105, 160), AnimationCount = 8, AnimationDelay = 150, Index = 0, Library = Libraries.CustomPrguse, Loop = true, Parent = this, UseOffSet = true, NotControl = true, }; PreviewImage = new MirAnimatedControl { Animated = false, Location = new Point(105, 160), AnimationCount = 6, AnimationDelay = 150, Index = 0, Library = Libraries.CustomPrguse, Loop = true, Parent = this, UseOffSet = true, NotControl = true, }; RightDirection = new MirButton { Index = 243, HoverIndex = 244, PressedIndex = 245, Library = Libraries.Prguse2, Parent = this, Location = new Point(160, 282), Sound = SoundList.ButtonA, }; RightDirection.Click += (o, e) => { Direction++; if (Direction > 8) { Direction = 1; } UpdateViewer(); }; LeftDirection = new MirButton { Index = 240, HoverIndex = 241, PressedIndex = 242, Library = Libraries.CustomPrguse2, Parent = this, Location = new Point(81, 282), Sound = SoundList.ButtonA, }; LeftDirection.Click += (o, e) => { Direction--; if (Direction == 0) { Direction = 8; } UpdateViewer(); }; }
public MainDialog() { Index = Settings.Resolution == 800 ? 0 : Settings.Resolution == 1024 ? 1 : 2; Library = Libraries.Prguse; Location = new Point(((Settings.ScreenWidth / 2) - (Size.Width / 2)), Settings.ScreenHeight - Size.Height); PixelDetect = true; LeftCap = new MirImageControl { Index = 12, Library = Libraries.Prguse, Location = new Point(-67, this.Size.Height - 96), Parent = this, Visible = false }; RightCap = new MirImageControl { Index = 13, Library = Libraries.Prguse, Location = new Point(1024, this.Size.Height - 104), Parent = this, Visible = false }; if (Settings.Resolution > 1024) { LeftCap.Visible = true; RightCap.Visible = true; } InventoryButton = new MirButton { HoverIndex = 1904, Index = 1903, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 96, 76), Parent = this, PressedIndex = 1905, Sound = SoundList.ButtonA, Hint = "Inventory (I)" }; InventoryButton.Click += (o, e) => { if (GameScene.Scene.InventoryDialog.Visible) GameScene.Scene.InventoryDialog.Hide(); else GameScene.Scene.InventoryDialog.Show(); }; CharacterButton = new MirButton { HoverIndex = 1901, Index = 1900, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 119, 76), Parent = this, PressedIndex = 1902, Sound = SoundList.ButtonA, Hint = "Character (C)" }; CharacterButton.Click += (o, e) => { if (GameScene.Scene.CharacterDialog.Visible && GameScene.Scene.CharacterDialog.CharacterPage.Visible) GameScene.Scene.CharacterDialog.Hide(); else { GameScene.Scene.CharacterDialog.Show(); GameScene.Scene.CharacterDialog.ShowCharacterPage(); } }; SkillButton = new MirButton { HoverIndex = 1907, Index = 1906, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 73, 76), Parent = this, PressedIndex = 1908, Sound = SoundList.ButtonA, Hint = "Skills (S)" }; SkillButton.Click += (o, e) => { if (GameScene.Scene.CharacterDialog.Visible && GameScene.Scene.CharacterDialog.SkillPage.Visible) GameScene.Scene.CharacterDialog.Hide(); else { GameScene.Scene.CharacterDialog.Show(); GameScene.Scene.CharacterDialog.ShowSkillPage(); } }; QuestButton = new MirButton { HoverIndex = 1910, Index = 1909, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 50, 76), Parent = this, PressedIndex = 1911, Sound = SoundList.ButtonA, Hint = "Quests (Q)" }; QuestButton.Click += (o, e) => { if (!GameScene.Scene.QuestLogDialog.Visible) GameScene.Scene.QuestLogDialog.Show(); else GameScene.Scene.QuestLogDialog.Hide(); }; OptionButton = new MirButton { HoverIndex = 1913, Index = 1912, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 27, 76), Parent = this, PressedIndex = 1914, Sound = SoundList.ButtonA, Hint = "Options (O)" }; OptionButton.Click += (o, e) => { if (!GameScene.Scene.OptionDialog.Visible) GameScene.Scene.OptionDialog.Show(); else GameScene.Scene.OptionDialog.Hide(); }; MenuButton = new MirButton { HoverIndex = 1961, Index = 1960, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 55, 35), Parent = this, PressedIndex = 1962, Sound = SoundList.ButtonC, Hint = "Menu" }; MenuButton.Click += (o, e) => { if (!GameScene.Scene.MenuDialog.Visible) GameScene.Scene.MenuDialog.Show(); else GameScene.Scene.MenuDialog.Hide(); }; GameShopButton = new MirButton { HoverIndex = 827, Index = 826, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 105, 35), Parent = this, PressedIndex = 828, Sound = SoundList.ButtonC, Hint = "Game Shop" }; GameShopButton.Click += (o, e) => { if (!GameScene.Scene.GameShopDialog.Visible) GameScene.Scene.GameShopDialog.Show(); else GameScene.Scene.GameShopDialog.Hide(); }; HealthOrb = new MirControl { Parent = this, Location = new Point(0, 30), NotControl = true, }; HealthOrb.BeforeDraw += HealthOrb_BeforeDraw; HealthLabel = new MirLabel { AutoSize = true, Location = new Point(0, 27), Parent = HealthOrb }; HealthLabel.SizeChanged += Label_SizeChanged; ManaLabel = new MirLabel { AutoSize = true, Location = new Point(0, 42), Parent = HealthOrb }; ManaLabel.SizeChanged += Label_SizeChanged; TopLabel = new MirLabel { Size = new Size(85, 30), DrawFormat = TextFormatFlags.HorizontalCenter, Location = new Point(9, 20), Parent = HealthOrb, }; BottomLabel = new MirLabel { Size = new Size(85, 30), DrawFormat = TextFormatFlags.HorizontalCenter, Location = new Point(9, 50), Parent = HealthOrb, }; LevelLabel = new MirLabel { AutoSize = true, Parent = this, Location = new Point(5, 108) }; CharacterName = new MirLabel { DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, Parent = this, Location = new Point(6, 120), Size = new Size(90, 16) }; ExperienceBar = new MirImageControl { Index = Settings.Resolution != 800 ? 8 : 7, Library = Libraries.Prguse, Location = new Point(9, 143), Parent = this, DrawImage = false, NotControl = true, }; ExperienceBar.BeforeDraw += ExperienceBar_BeforeDraw; ExperienceLabel = new MirLabel { AutoSize = true, Parent = ExperienceBar, NotControl = true, }; GoldLabel = new MirLabel { DrawFormat = TextFormatFlags.VerticalCenter, Font = new Font(Settings.FontName, 8F), Location = new Point(this.Size.Width - 105, 119), Parent = this, Size = new Size(99, 13), Sound = SoundList.Gold, }; GoldLabel.Click += (o, e) => { if (GameScene.SelectedCell == null) GameScene.PickedUpGold = !GameScene.PickedUpGold && GameScene.Gold > 0; }; WeightBar = new MirImageControl { Index = 76, Library = Libraries.Prguse, Location = new Point(this.Size.Width - 105, 103), Parent = this, DrawImage = false, NotControl = true, }; WeightBar.BeforeDraw += WeightBar_BeforeDraw; WeightLabel = new MirLabel { Parent = this, Location = new Point(this.Size.Width - 30, 101), Size = new Size(26, 14), }; AModeLabel = new MirLabel { AutoSize = true, ForeColour = Color.Yellow, OutLineColour = Color.Black, Parent = this, Location = new Point(Settings.Resolution != 800 ? 899 : 675, Settings.Resolution != 800 ? -448 : -280), }; PModeLabel = new MirLabel { AutoSize = true, ForeColour = Color.Orange, OutLineColour = Color.Black, Parent = this, Location = new Point(230, 125), Visible = false }; SModeLabel = new MirLabel { AutoSize = true, ForeColour = Color.LimeGreen, OutLineColour = Color.Black, Parent = this, Location = new Point(Settings.Resolution != 800 ? 899 : 675, Settings.Resolution != 800 ? -463 : -295), }; }
public MirMessageBox1(string message, MirMessageBoxButtons1 b = MirMessageBoxButtons1.OK) { DrawImage = true; ForeColour = Color.White; Buttons = b; Modal = true; Movable = false; Index = 990; Library = Libraries.Prguse; Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2); Label = new MirLabel { AutoSize = false, // DrawFormat = StringFormatFlags.FitBlackBox, Location = new Point(35 - 20, 35 - 16), Size = new Size(390, 110), Parent = this, Text = message }; switch (Buttons) { case MirMessageBoxButtons1.OK: OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(340, 157), Parent = this, PressedIndex = 202, }; OKButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons1.OKCancel: OKButton = new MirButton { HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(250, 157), Parent = this, PressedIndex = 202, }; OKButton.Click += (o, e) => Dispose(); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(340, 157), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons1.YesNo: // 116 YesButton = new MirButton { HoverIndex = 117, Index = 116, Library = Libraries.Title, Location = new Point(250 - 30 - 50 - 15, 157 - 50 - 15 + 4), Parent = this, PressedIndex = 118, }; YesButton.Click += (o, e) => Dispose(); NoButton = new MirButton { HoverIndex = 184, Index = 183, Library = Libraries.Title, Location = new Point(340 - 30 - 50 - 25 - 10, 157 - 50 - 15 + 4), Parent = this, PressedIndex = 185, }; NoButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons1.YesNoCancel: YesButton = new MirButton { HoverIndex = 207, Index = 206, Library = Libraries.Title, Location = new Point(160, 157), Parent = this, PressedIndex = 208, }; YesButton.Click += (o, e) => Dispose(); NoButton = new MirButton { HoverIndex = 211, Index = 210, Library = Libraries.Title, Location = new Point(250, 157), Parent = this, PressedIndex = 212, }; NoButton.Click += (o, e) => Dispose(); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(340, 157), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); break; case MirMessageBoxButtons1.Cancel: CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(340, 157), Parent = this, PressedIndex = 205, }; CancelButton.Click += (o, e) => Dispose(); break; } }
public TradeDialog() { Index = 389; Library = Libraries.Prguse; Movable = true; Size = new Size(204, 152); Location = new Point((Settings.ScreenWidth / 2) - Size.Width - 10, Settings.ScreenHeight - 350); Sort = true; #region Buttons ConfirmButton = new MirButton { Index = 520, HoverIndex = 521, Location = new Point(135, 120), Size = new Size(48, 25), Library = Libraries.Title, Parent = this, PressedIndex = 522, Sound = SoundList.ButtonA, }; ConfirmButton.Click += (o, e) => { ChangeLockState(!GameScene.User.TradeLocked); }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(Size.Width - 23, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => { Hide(); GameScene.Scene.GuestTradeDialog.Hide(); TradeCancel(); }; #endregion #region Host labels NameLabel = new MirLabel { Parent = this, Location = new Point(20, 10), Size = new Size(150, 14), DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, NotControl = true, }; GoldLabel = new MirLabel { DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, Font = new Font(Settings.FontName, 8F), Location = new Point(35, 123), Parent = this, Size = new Size(90, 15), Sound = SoundList.Gold, }; GoldLabel.Click += (o, e) => { if (GameScene.SelectedCell == null && GameScene.Gold > 0) { MirAmountBox amountBox = new MirAmountBox("Trade Amount:", 116, GameScene.Gold); amountBox.OKButton.Click += (c, a) => { if (amountBox.Amount > 0) { GameScene.User.TradeGoldAmount += amountBox.Amount; Network.Enqueue(new C.TradeGold { Amount = amountBox.Amount }); RefreshInterface(); } }; amountBox.Show(); GameScene.PickedUpGold = false; } }; #endregion #region Grids Grid = new MirItemCell[5 * 2]; for (int x = 0; x < 5; x++) { for (int y = 0; y < 2; y++) { Grid[2 * x + y] = new MirItemCell { ItemSlot = 2 * x + y, GridType = MirGridType.Trade, Parent = this, Location = new Point(x * 36 + 10 + x, y * 32 + 39 + y), }; } } #endregion }
public GuildDialog() { Index = 180; Library = Libraries.Prguse; Movable = true; Sort = true; Location = Center; #region TabUI NoticeButton = new MirButton { Library = Libraries.Title, Index = 93, PressedIndex = 94, Sound = SoundList.ButtonA, Parent = this, Location = new Point(20, 38) }; NoticeButton.Click += (o, e) => LeftDialog(0); MembersButton = new MirButton { Library = Libraries.Title, Index = 99, PressedIndex = 100, Sound = SoundList.ButtonA, Parent = this, Location = new Point(91, 38), }; MembersButton.Click += (o, e) => LeftDialog(1); StorageButton = new MirButton { Library = Libraries.Title, Index = 105, PressedIndex = 106, Sound = SoundList.ButtonA, Parent = this, Location = new Point(162, 38), Visible = false }; StorageButton.Click += (o, e) => LeftDialog(2); BuffsButton = new MirButton { Library = Libraries.Title, Index = 526, HoverIndex = 527, PressedIndex = 528, Sound = SoundList.ButtonA, Parent = StatusPage, Location = new Point(124, 63), Visible = false, }; BuffsButton.Click += (o, e) => { GameScene.Scene.GuildBuffDialog.Show(); Hide(); }; RankButton = new MirButton // Ranks { Library = Libraries.Title, Index = 101, HoverIndex = 102, Sound = SoundList.ButtonA, Parent = this, Location = new Point(233, 38), Visible = false, }; RankButton.Click += (o, e) => LeftDialog(3); CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(565, 4), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA }; CloseButton.Click += (o, e) => Hide(); #endregion #endregion #region NoticePageUI NoticePage = new MirImageControl() { Parent = this, Size = new Size(352, 372), Location = new Point(0, 60), Visible = true }; Notice = new MirTextBox() { ForeColour = Color.White, Font = new Font(Settings.FontName, 8F), Enabled = false, Visible = true, Parent = NoticePage, Size = new Size(322, 330), Location = new Point(13, 1) //sorting = true }; Notice.MultiLine(); NoticeEditButton = new MirButton { Visible = false, Index = 560, HoverIndex = 561, PressedIndex = 562, Library = Libraries.Prguse, Sound = SoundList.ButtonA, Parent = NoticePage, Location = new Point(20, 342) }; NoticeEditButton.Click += (o, e) => EditNotice(); NoticeSaveButton = new MirButton { Visible = false, Index = 554, HoverIndex = 555, PressedIndex = 556, Library = Libraries.Prguse, Sound = SoundList.ButtonA, Parent = NoticePage, Location = new Point(20, 342) }; NoticeSaveButton.Click += (o, e) => EditNotice(); NoticeUpButton = new MirButton { HoverIndex = 198, Index = 197, Visible = true, Library = Libraries.Prguse2, Location = new Point(337, 1), Size = new Size(16, 14), Parent = NoticePage, PressedIndex = 199, Sound = SoundList.ButtonA }; NoticeUpButton.Click += (o, e) => { if (NoticeScrollIndex == 0) return; if (NoticeScrollIndex >= 25) NoticeScrollIndex -= 24; NoticeScrollIndex--; UpdateNotice(); }; NoticeDownButton = new MirButton { HoverIndex = 208, Index = 207, Visible = true, Library = Libraries.Prguse2, Location = new Point(337, 318), Size = new Size(16, 14), Parent = NoticePage, PressedIndex = 209, Sound = SoundList.ButtonA }; NoticeDownButton.Click += (o, e) => { if (NoticeScrollIndex == Notice.MultiText.Length - 1) return; if (NoticeScrollIndex < 25) NoticeScrollIndex = 24; NoticeScrollIndex++; UpdateNotice(); }; NoticePositionBar = new MirButton { Index = 206, Library = Libraries.Prguse2, Location = new Point(336, 15), Parent = NoticePage, Movable = true, Visible = true, Sound = SoundList.None }; NoticePositionBar.OnMoving += NoticePositionBar_OnMoving; NoticePage.KeyDown += NoticePanel_KeyDown; NoticePage.MouseWheel += NoticePanel_MouseWheel; #endregion #region MembersPageUI MembersPage = new MirImageControl() { Parent = this, Size = new Size(330, 372), Location = new Point(0, 60), Visible = false }; MembersPageBase = new MirImageControl() { Library = Libraries.Prguse, Index = 1852, Parent = MembersPage, Location = new Point(13, 1), Visible = true }; MembersPage.BeforeDraw += (o, e) => RequestUpdateMembers(); MembersRanks = new MirDropDownBox[MemberPageRows]; MembersName = new MirLabel[MemberPageRows]; MembersStatus = new MirLabel[MemberPageRows]; MembersDelete = new MirButton[MemberPageRows]; for (int i = MembersRanks.Length - 1; i >= 0; i--) { int index = i; MembersRanks[i] = new MirDropDownBox() { BackColour = i % 2 == 0 ? Color.FromArgb(255, 10, 10, 10) : Color.FromArgb(255, 15, 15, 15), ForeColour = Color.White, Parent = MembersPage, Size = new Size(100, 14), Location = new Point(24, 30 + (i * 15)), Visible = false, Enabled = false }; MembersRanks[index].ValueChanged += (o, e) => OnNewRank(index, MembersRanks[index]._WantedIndex); } for (int i = 0; i < MembersName.Length; i++) { MembersName[i] = new MirLabel() { BackColour = i % 2 == 0 ? Color.FromArgb(255, 05, 05, 05) : Color.FromArgb(255, 07, 07, 07), ForeColour = Color.White, Parent = MembersPage, Size = new Size(100, 14), Location = new Point(125, 30 + (i * 15)), Visible = false, Enabled = false, Font = new Font(Settings.FontName, 7F) }; } for (int i = 0; i < MembersStatus.Length; i++) { MembersStatus[i] = new MirLabel() { BackColour = i % 2 == 0 ? Color.FromArgb(255, 10, 10, 10) : Color.FromArgb(255, 15, 15, 15), ForeColour = Color.White, Parent = MembersPage, Size = new Size(100, 14), Location = new Point(225, 30 + (i * 15)), Visible = false, Enabled = false, Font = new Font(Settings.FontName, 7F) }; } for (int i = 0; i < MembersDelete.Length; i++) { int index = i; MembersDelete[i] = new MirButton() { Enabled = true, Visible = true, Location = new Point(210, 30 + (i * 15)), Library = Libraries.Prguse, Index = 917, Parent = MembersPage }; MembersDelete[index].Click += (o, e) => DeleteMember(index); } MembersUpButton = new MirButton { HoverIndex = 198, Index = 197, Visible = true, Library = Libraries.Prguse2, Location = new Point(315, 0), Size = new Size(16, 14), Parent = MembersPage, PressedIndex = 199, Sound = SoundList.ButtonA }; MembersUpButton.Click += (o, e) => { if (MemberScrollIndex == 0) return; MemberScrollIndex--; UpdateMembers(); UpdateMembersScrollPosition(); }; MembersDownButton = new MirButton { HoverIndex = 208, Index = 207, Visible = true, Library = Libraries.Prguse2, Location = new Point(315, 316), Size = new Size(16, 14), Parent = MembersPage, PressedIndex = 209, Sound = SoundList.ButtonA }; MembersDownButton.Click += (o, e) => { if (MemberScrollIndex == MembersShowCount - MemberPageRows) return; MemberScrollIndex++; UpdateMembers(); UpdateMembersScrollPosition(); }; MembersPositionBar = new MirButton { Index = 955, Library = Libraries.Prguse, Location = new Point(315, 15), Parent = MembersPage, Movable = true, Sound = SoundList.None }; MembersPositionBar.OnMoving += MembersPositionBar_OnMoving; MembersShowOfflineButton = new MirButton { Visible = true, Index = 1346, Library = Libraries.Prguse, Sound = SoundList.ButtonA, Parent = MembersPage, Location = new Point(230, 310) }; MembersShowOfflineButton.Click += (o, e) => MembersShowOfflineSwitch(); MembersShowOfflineStatus = new MirImageControl { Visible = true, Index = 1347, Library = Libraries.Prguse, Parent = MembersPage, Location = new Point(230, 310) }; MembersShowOfflineStatus.Click += (o, e) => MembersShowOfflineSwitch(); MembersShowOffline = new MirLabel { Visible = true, Text = "Show Offline", Location = new Point(245, 309), Parent = MembersPage, Size = new Size(150, 12), Font = new Font(Settings.FontName, 7F), ForeColour = Color.White }; MembersPage.KeyDown += MembersPanel_KeyDown; MembersPage.MouseWheel += MembersPanel_MouseWheel; #endregion #region StatusDialogUI StatusPage = new MirImageControl() { Parent = this, Size = new Size(230, 372), Location = new Point(355, 60), Visible = true }; StatusPageBase = new MirImageControl() { Parent = StatusPage, Library = Libraries.Prguse, Index = 1850, Visible = true, Location = new Point(10, 2) }; StatusPage.BeforeDraw += (o, e) => { if (MapControl.User.GuildName == "") StatusData.Text = ""; else StatusData.Text = string.Format("{0}\n\n{1}\n\n{2}/{3}", MapObject.User.GuildName, Level, MemberCount, MaxMembers == 0 ? "Unlimited" : MaxMembers.ToString()); }; StatusHeaders = new MirLabel() { Location = new Point(46, 49), Size = new Size(100, 300), NotControl = true, Text = "Guild Name\n\nLevel\n\nMembers", Visible = true, Parent = StatusPage }; StatusData = new MirLabel() { Location = new Point(122, 49), Size = new Size(100, 300), NotControl = true, Text = "", Visible = true, Parent = StatusPage }; StatusExpBar = new MirImageControl() { //Index = 7, Library = Libraries.Prguse, Location = new Point(0, 0), DrawImage = false, NotControl = true, Parent = StatusPage, Size = new Size(550, 7) }; StatusExpBar.BeforeDraw += StatusExpBar_BeforeDraw; StatusExpLabel = new MirLabel() { DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Location = new Point(0, 0), NotControl = true, Parent = StatusPage, Size = new Size(550, 12) }; MembersRecruitName = new MirTextBox() { Location = new Point(40, 300), Size = new Size(130, 21), MaxLength = 20, Parent = StatusPage, Visible = true, Text = "", BackColour = Color.FromArgb(255, 6, 6, 6), Border = true, BorderColour = Color.FromArgb(255, 20, 20, 20), CanLoseFocus = true //sorting = true }; RecruitMemberButton = new MirButton() { Parent = StatusPage, Enabled = true, Visible = true, Location = new Point(170, 299), Library = Libraries.Title, Index = 356, HoverIndex = 357, PressedIndex = 358 }; RecruitMemberButton.Click += (o, e) => AddMember(); #endregion #region StorageDialogUI StoragePage = new MirImageControl() { Parent = this, Size = new Size(352, 372), Location = new Point(0, 60), Visible = false }; StoragePageBase = new MirImageControl() { Visible = true, Parent = StoragePage, Library = Libraries.Prguse, Index = 1851, Location = new Point(30, 19) }; StoragePage.BeforeDraw += (o, e) => { StorageGoldText.Text = Gold > 0 ? string.Format("{0:###,###,###}", Gold) : "0"; if (MyRankId == 0) StorageGoldRemove.Visible = true; else StorageGoldRemove.Visible = false; }; StorageGoldText = new MirLabel() { Parent = StoragePage, Size = new Size(125, 12), Location = new Point(194, 312), Visible = true, Text = "0", NotControl = true, }; StorageGoldAdd = new MirButton() { Parent = StoragePage, Library = Libraries.Prguse, Index = 918, Visible = true, Enabled = true, Location = new Point(306, 313) }; StorageGoldAdd.Click += (o, e) => StorageAddGold(); StorageGoldRemove = new MirButton() { Visible = false, Enabled = true, Location = new Point(218, 10) }; StorageGoldRemove.Click += (o, e) => StorageRemoveGold(); StorageGrid = new MirItemCell[8 * 8]; { for (int x = 0; x < 8; x++) { for (int y = 0; y < 8; y++) { int idx = 8 * y + x; StorageGrid[idx] = new MirItemCell { ItemSlot = idx, GridType = MirGridType.GuildStorage, Library = Libraries.Items, Parent = StoragePage, Size = new Size(35, 35), Location = new Point(x * 35 + 31 + x, y * 35 + 20 + y), }; } } } #endregion #region RankDialogUI RankPage = new MirImageControl() { Parent = this, Size = new Size(352, 372), Location = new Point(0, 60), Visible = false }; RankPage.BeforeDraw += (o, e) => RequestUpdateMembers(); RanksSelectTextL = new MirLabel() { Text = "Edit Rank", Location = new Point(42,36), Size = new Size(150, 20), ForeColour = Color.White, Parent = RankPage, NotControl = true, }; RanksSelectTextR = new MirLabel() { Text = "Select Rank", Location = new Point(198, 36), Size = new Size(150, 20), ForeColour = Color.White, Parent = RankPage, NotControl = true, }; RanksSelectBox = new MirDropDownBox() { Parent = RankPage, Location = new Point(198, 36), Size = new Size(130, 16), ForeColour = Color.White, Visible = true, Enabled = true }; RanksSelectBox.ValueChanged += (o, e) => OnRankSelect(RanksSelectBox._WantedIndex); RanksName = new MirTextBox() { Location = new Point(42, 36), Size = new Size(130, 16), MaxLength = 20, Parent = RankPage, Visible = true, Enabled = false, Text = "", BackColour = Color.FromArgb(255, 6, 6, 6), Border = true, BorderColour = Color.FromArgb(255, 20, 20, 20) }; RanksName.BeforeDraw += (o, e) => RanksName_BeforeDraw(); RanksName.TextBox.KeyPress += RanksName_KeyPress; RanksSaveName = new MirButton() { Location = new Point(155, 290), Enabled = false, Visible = true, Parent = RankPage, Index = 90, HoverIndex = 91, PressedIndex = 92, Library = Libraries.Title, Sound = SoundList.ButtonA }; RanksSaveName.Click += (o, e) => { RanksChangeName(); }; String[] Options = { "Edit ranks", "Recruit member", "Kick member", "Store item", "Retrieve item", "Alter alliance", "Change notice", "Activate Buff" }; RanksOptionsButtons = new MirButton[8]; RanksOptionsStatus = new MirImageControl[8]; RanksOptionsTexts = new MirLabel[8]; for (int i = 0; i < RanksOptionsButtons.Length; i++) { RanksOptionsButtons[i] = new MirButton() { Visible = true, Enabled = false, Index = 1346, Library = Libraries.Prguse, Sound = SoundList.ButtonA, Parent = RankPage, Location = new Point(i % 2 == 0 ? 32 : 202, i % 2 == 0 ? 120 + (i * 20) : 120 + ((i - 1) * 20)) }; int index = i; RanksOptionsButtons[i].Click += (o, e) => SwitchRankOption(index); } for (int i = 0; i < RanksOptionsStatus.Length; i++) { RanksOptionsStatus[i] = new MirImageControl() { Visible = false, Index = 1347, Library = Libraries.Prguse, Parent = RankPage, NotControl = true, Location = new Point(i % 2 == 0 ? 32 : 202, i % 2 == 0 ? 120 + (i * 20) : 120 + ((i - 1) * 20)) }; int index = i; RanksOptionsStatus[i].Click += (o, e) => SwitchRankOption(index); } for (int i = 0; i < RanksOptionsTexts.Length; i++) { RanksOptionsTexts[i] = new MirLabel() { Visible = true, NotControl = true, Parent = RankPage, Location = new Point(17 + (i % 2 == 0 ? 32 : 202), i % 2 == 0 ? 118 + (i * 20) : 118 + ((i - 1) * 20)), AutoSize = true, Text = Options[i] }; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); Quest = null; ScrollUpButton = null; ScrollDownButton = null; PositionBar = null; CurrentLines.Clear(); }
public GuildBuffDialog() { Index = 518; Library = Libraries.Title; Movable = true; Sort = true; Location = Center; BeforeDraw += (o, e) => RefreshInterface(); GrowthButton = new MirButton { Library = Libraries.Title, Location = new Point(12, 37), Parent = this, PressedIndex = 546, Index = 547, Sound = SoundList.ButtonA, Size = new Size(72, 24) }; GrowthButton.Click += (o, e) => ShowGrowthPage(); ExpButton = new MirButton { Library = Libraries.Title, Location = new Point(83, 37), Parent = this, PressedIndex = 548, Index = 548, Sound = SoundList.ButtonA, Size = new Size(72, 24) }; ExpButton.Click += (o, e) => ShowExpPage(); GuildName = new MirLabel { DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Parent = this, Location = new Point(27,6), Size = new Size(250,20), NotControl = true }; PointsLeft = new MirLabel { DrawFormat = TextFormatFlags.HorizontalCenter, Parent = this, Location = new Point(18, 63), Size = new Size(253, 20), NotControl = true }; StatusExpBar = new MirImageControl() { Visible = false, Index = 423, Library = Libraries.Prguse2, Location = new Point(18, 80), DrawImage = false, NotControl = true, Parent = this, Size = new Size(260, 22) }; StatusExpBar.BeforeDraw += StatusExpBar_BeforeDraw; StatusExpLabel = new MirLabel() { Visible = false, DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Location = new Point(18, 80), NotControl = true, Parent = this, Size = new Size(260, 22) }; UpButton = new MirButton { Index = 197, HoverIndex = 198, PressedIndex = 199, Library = Libraries.Prguse2, Location = new Point(276, 63), Parent = this, Sound = SoundList.ButtonA }; UpButton.Click += (o, e) => { if (StartIndex == 0) return; StartIndex--; UpdatePositionBar(); RefreshInterface(); }; DownButton = new MirButton { Index = 207, HoverIndex = 208, PressedIndex = 209, Library = Libraries.Prguse2, Location = new Point(276, 378), Parent = this, Sound = SoundList.ButtonA }; DownButton.Click += (o, e) => { if (GuildBuffInfos.Count < 8 ) return; if (StartIndex == GuildBuffInfos.Count - 8) return; StartIndex++; UpdatePositionBar(); RefreshInterface(); }; PositionBar = new MirButton { Index = 205, HoverIndex = 206, PressedIndex = 206, Library = Libraries.Prguse2, Parent = this, Movable = true, Sound = SoundList.None, Location = new Point(276, 77) }; PositionBar.OnMoving += PositionBar_OnMoving; PositionBar.MouseUp += (o, e) => RefreshInterface(); Buffs = new GuildBuffButton[8]; for (byte i = 0; i < Buffs.Length; i++) { byte Id = i; Buffs[i] = new GuildBuffButton { Parent = this, Visible = false, Location = new Point(18, 88 + (i * 38)), Id = Id }; Buffs[i].Click += (o, e) => RequestBuff(Id); } CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(279, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); }
public QuestDiaryDialog() { Index = 961; Library = Libraries.Prguse; Movable = true; Sort = true; Location = new Point(Settings.ScreenWidth / 2 - 300 - 20, 60); MirImageControl TitleLabel = new MirImageControl { Index = 15, Library = Libraries.Title, Location = new Point(18, 5), Parent = this }; _takenQuestsLabel = new MirLabel { Font = new Font(Settings.FontName, 8F), Parent = this, AutoSize = true, Location = new Point(210, 7) }; _closeButton = new MirButton { Index = 193, HoverIndex = 194, PressedIndex = 195, Library = Libraries.Title, Parent = this, Location = new Point(200, 437), Sound = SoundList.ButtonA, }; _closeButton.Click += (o, e) => Hide(); MirButton closeButton = new MirButton { Index = 360, HoverIndex = 361, PressedIndex = 362, Library = Libraries.Prguse2, Parent = this, Location = new Point(289, 3), Sound = SoundList.ButtonA, }; closeButton.Click += (o, e) => Hide(); }
public TrustMerchantDialog() { Index = 670; Library = Libraries.Prguse; Sort = true; SearchTextBox = new MirTextBox { Location = new Point(19, 329), Parent = this, Size = new Size(104, 15), MaxLength = 20, CanLoseFocus = true }; SearchTextBox.TextBox.KeyPress += SearchTextBox_KeyPress; SearchTextBox.TextBox.KeyUp += SearchTextBox_KeyUp; SearchTextBox.TextBox.KeyDown += SearchTextBox_KeyDown; FindButton = new MirButton { HoverIndex = 481, Index = 480, Location = new Point(130, 325), Library = Libraries.Title, Parent = this, PressedIndex = 482, Sound = SoundList.ButtonA, }; FindButton.Click += (o, e) => { if (string.IsNullOrEmpty(SearchTextBox.Text)) return; if (CMain.Time < SearchTime) { GameScene.Scene.ChatDialog.ReceiveChat(string.Format("You can search again after {0} seconds.", Math.Ceiling((SearchTime - CMain.Time) / 1000D)), ChatType.System); return; } SearchTime = CMain.Time + Globals.SearchDelay; Network.Enqueue(new C.MarketSearch { Match = SearchTextBox.Text, }); }; RefreshButton = new MirButton { HoverIndex = 664, Index = 663, Location = new Point(190, 325), Library = Libraries.Prguse, Parent = this, PressedIndex = 665, Sound = SoundList.ButtonA, }; RefreshButton.Click += (o, e) => { if (CMain.Time < SearchTime) { GameScene.Scene.ChatDialog.ReceiveChat(string.Format("You can search again after {0} seconds.", Math.Ceiling((SearchTime - CMain.Time) / 1000D)), ChatType.System); return; } SearchTime = CMain.Time + Globals.SearchDelay; SearchTextBox.Text = string.Empty; Network.Enqueue(new C.MarketRefresh()); }; MailButton = new MirButton { HoverIndex = 667, Index = 666, Location = new Point(225, 325), Library = Libraries.Prguse, Parent = this, PressedIndex = 668, Sound = SoundList.ButtonA, Visible = false }; BuyButton = new MirButton { HoverIndex = 484, Index = 483, Location = new Point(400, 325), Library = Libraries.Title, Parent = this, PressedIndex = 485, Sound = SoundList.ButtonA, }; BuyButton.Click += (o, e) => { if (Selected == null || CMain.Time < MarketTime) return; if (UserMode) { if (Selected.Listing.Seller == "For Sale") { MirMessageBox box = new MirMessageBox(string.Format("{0} has not sold, Are you sure you want to get it back?", Selected.Listing.Item.Name), MirMessageBoxButtons.YesNo); box.YesButton.Click += (o1, e2) => { MarketTime = CMain.Time + 3000; Network.Enqueue(new C.MarketGetBack { AuctionID = Selected.Listing.AuctionID }); }; box.Show(); } else { MarketTime = CMain.Time + 3000; Network.Enqueue(new C.MarketGetBack { AuctionID = Selected.Listing.AuctionID }); } } else { MirMessageBox box = new MirMessageBox(string.Format("Are you sure you want to buy {0} for {1}?", Selected.Listing.Item.Name, Selected.Listing.Price), MirMessageBoxButtons.YesNo); box.YesButton.Click += (o1, e2) => { MarketTime = CMain.Time + 3000; Network.Enqueue(new C.MarketBuy { AuctionID = Selected.Listing.AuctionID }); }; box.Show(); } }; BackButton = new MirButton { Index = 398, Location = new Point(189, 298), Library = Libraries.Prguse, Parent = this, PressedIndex = 399, Sound = SoundList.ButtonA, }; BackButton.Click += (o, e) => { if (Page <= 0) return; Page--; UpdateInterface(); }; NextButton = new MirButton { Index = 396, Location = new Point(283, 298), Library = Libraries.Prguse, Parent = this, PressedIndex = 397, Sound = SoundList.ButtonA, }; NextButton.Click += (o, e) => { if (Page >= PageCount - 1) return; if (Page < (Listings.Count - 1) / 10) { Page++; UpdateInterface(); return; } Network.Enqueue(new C.MarketPage { Page = Page + 1 }); }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(462, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); PageLabel = new MirLabel { Location = new Point(207, 298), Size = new Size(70, 18), DrawFormat = TextFormatFlags.HorizontalCenter, Parent = this, NotControl = true, Text = "0/0", }; NameLabel = new MirLabel { AutoSize = true, ForeColour = Color.Yellow, Location = new Point(20, 240), Parent = this, NotControl = true, }; TotalPriceLabel = new MirLabel { AutoSize = true, Location = new Point(20, 256), Parent = this, NotControl = true, }; SplitPriceLabel = new MirLabel { AutoSize = true, Location = new Point(20, 272), Parent = this, NotControl = true, }; DateLabel = new MirLabel { AutoSize = true, Location = new Point(250, 245), Parent = this, NotControl = true, Text = "Start Date:" }; ExpireLabel = new MirLabel { AutoSize = true, Location = new Point(250, 265), Parent = this, NotControl = true, Text = "Expire Date:" }; ItemLabel = new MirLabel { Location = new Point(7, 32), Size = new Size(142, 22), DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Text = "Item", }; PriceLabel = new MirLabel { Location = new Point(148, 32), Size = new Size(180, 22), DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Text = "Price", }; SellerLabel = new MirLabel { Location = new Point(327, 32), Size = new Size(150, 22), DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter, Parent = this, NotControl = true, Text = "Seller", }; for (int i = 0; i < Rows.Length; i++) { Rows[i] = new AuctionRow { Location = new Point(8, 54 + i * 18), Parent = this }; Rows[i].Click += (o, e) => { Selected = (AuctionRow)o; UpdateInterface(); }; } ItemCell = new MirItemCell { ItemSlot = 0, GridType = MirGridType.TrustMerchant, Library = Libraries.Items, Parent = this, Location = new Point(195, 248), }; }
public QuestListDialog() { Index = 950; Library = Libraries.Prguse; Movable = true; Sort = true; Location = new Point(GameScene.Scene.NPCDialog.Size.Width + 47, 0); MirImageControl TitleLabel = new MirImageControl { Index = 14, Library = Libraries.Title, Location = new Point(18, 5), Parent = this }; #region QuestSelection MirButton upQuestButton = new MirButton { Index = 951, HoverIndex = 952, PressedIndex = 953, Library = Libraries.Prguse, Parent = this, Location = new Point(291, 35), Sound = SoundList.ButtonA, }; upQuestButton.Click += (o, e) => { if (SelectedQuest != null) { SelectedIndex = FindSelectedIndex(); if (SelectedIndex > 0) SelectedIndex--; else StartIndex--; } RefreshInterface(); }; MirButton downQuestButton = new MirButton { Index = 957, HoverIndex = 958, PressedIndex = 959, Library = Libraries.Prguse, Parent = this, Location = new Point(291, 83), Sound = SoundList.ButtonA, }; downQuestButton.Click += (o, e) => { if (SelectedQuest != null) { SelectedIndex = FindSelectedIndex(); if (SelectedIndex < Rows.Length - 1) SelectedIndex++; else StartIndex++; } RefreshInterface(); }; #endregion #region Buttons _acceptButton = new MirButton { Index = 270, HoverIndex = 271, PressedIndex = 272, Library = Libraries.Title, Parent = this, Location = new Point(40, 437), Sound = SoundList.ButtonA, }; _acceptButton.Click += (o, e) => { if (Reward == null || SelectedQuest.Taken) return; Network.Enqueue(new C.AcceptQuest { NPCIndex = SelectedQuest.QuestInfo.NPCIndex, QuestIndex = SelectedQuest.QuestInfo.Index }); //Hide(); }; _finishButton = new MirButton { Index = 273, HoverIndex = 274, PressedIndex = 275, Library = Libraries.Title, Parent = this, Location = new Point(40, 437), Sound = SoundList.ButtonA, Visible = false }; _finishButton.Click += (o, e) => { if (Reward == null || !SelectedQuest.Completed) return; if (Reward.SelectedItemIndex < 0 && SelectedQuest.QuestInfo.RewardsSelectItem.Count > 0) { MirMessageBox messageBox = new MirMessageBox("You must select a reward item."); messageBox.Show(); return; } Network.Enqueue(new C.FinishQuest { QuestIndex = SelectedQuest.QuestInfo.Index, SelectedItemIndex = Reward.SelectedItemIndex }); //Hide(); }; MirButton leaveButton = new MirButton { Index = 276, HoverIndex = 277, PressedIndex = 278, Library = Libraries.Title, Parent = this, Location = new Point(205, 437), Sound = SoundList.ButtonA, }; leaveButton.Click += (o, e) => Hide(); #endregion #region Message Area MirButton upButton = new MirButton { Index = 197, HoverIndex = 198, PressedIndex = 199, Library = Libraries.Prguse2, Parent = this, Size = new Size(16, 14), Location = new Point(292, 136), Sound = SoundList.ButtonA, Visible = true }; MirButton downButton = new MirButton { Index = 207, HoverIndex = 208, Library = Libraries.Prguse2, PressedIndex = 209, Parent = this, Size = new Size(16, 14), Location = new Point(292, 282), Sound = SoundList.ButtonA, Visible = true }; MirButton positionBar = new MirButton { Index = 205, HoverIndex = 206, PressedIndex = 206, Library = Libraries.Prguse2, Location = new Point(292, 149), Parent = this, Movable = true, Sound = SoundList.None, Visible = false }; Message = new QuestMessage(upButton, downButton, positionBar, 10) { Font = new Font(Settings.FontName, 9F), Parent = this, Size = new Size(280, 160), Location = new Point(10, 135), PosMinY = 149, PosMaxY = 263 }; #endregion #region Rewards Reward = new QuestRewards { Parent = this, Visible = false, Size = new Size(313, 130), Location = new Point(5, 307) }; #endregion _availableQuestLabel = new MirLabel { Font = new Font(Settings.FontName, 8F), Parent = this, AutoSize = true, Location = new Point(210, 8) }; MirButton closeButton = new MirButton { Index = 360, HoverIndex = 361, PressedIndex = 362, Library = Libraries.Prguse2, Parent = this, Location = new Point(289, 3), Sound = SoundList.ButtonA, }; closeButton.Click += (o, e) => Hide(); MirButton helpButton = new MirButton { Index = 257, HoverIndex = 258, PressedIndex = 259, Library = Libraries.Prguse2, Parent = this, Location = new Point(266, 3), Sound = SoundList.ButtonA, }; helpButton.Click += (o, e) => GameScene.Scene.HelpDialog.DisplayPage("Quests"); }
public DuraStatusDialog() { Size = new Size(40, 19); Location = new Point((GameScene.Scene.MiniMapDialog.Location.X + 86), GameScene.Scene.MiniMapDialog.Size.Height); Character = new MirButton() { Index = 2113, Library = Libraries.Prguse, Parent = this, Size = new Size(20, 19), Location = new Point(20, 0), HoverIndex = 2111, PressedIndex = 2112, Sound = SoundList.ButtonA, Hint = "Dura Panel" }; Character.Click += (o, e) => { if (GameScene.Scene.CharacterDuraPanel.Visible == true) { GameScene.Scene.CharacterDuraPanel.Hide(); Character.Index = 2113; } else { GameScene.Scene.CharacterDuraPanel.Show(); Character.Index = 2110; } }; }
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 = "Legend of Mir 2", 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 }; StartGameButton.Click += (o, e) => StartGame(); NewCharacterButton = new MirButton { HoverIndex = 344, Index = 343, Library = Libraries.Title, Location = new Point(230, 568), Parent = Background, PressedIndex = 345, GrayScale = true }; 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 = "Last Online:", Size = new Size(100, 21), DrawFormat = TextFormatFlags.Left | TextFormatFlags.VerticalCenter, Border = true, }; UpdateInterface(); }
public IntelligentCreatureDialog() { Index = 468; Library = Libraries.Title; Movable = true; Sort = true; Location = Center; BeforeDraw += IntelligentCreatureDialog_BeforeDraw; #region CreatureButtons CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(Size.Width - 25, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); HelpPetButton = new MirButton { HoverIndex = 258, Index = 257, Location = new Point(Size.Width - 48, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 259, Sound = SoundList.ButtonA, }; CreatureRenameButton = new MirButton { HoverIndex = 571, Index = 570, Location = new Point(344, 50), Library = Libraries.Title, Parent = this, PressedIndex = 572, Sound = SoundList.ButtonA, Visible = false, }; CreatureRenameButton.Click += ButtonClick; SummonButton = new MirButton { Index = 576, HoverIndex = 577, PressedIndex = 578, Location = new Point(113, 217), Library = Libraries.Title, Parent = this, Sound = SoundList.ButtonA, }; SummonButton.Click += ButtonClick; DismissButton = new MirButton//Dismiss the summoned pet { HoverIndex = 581, Index = 580, Location = new Point(113, 217), Library = Libraries.Title, Parent = this, PressedIndex = 582, Sound = SoundList.ButtonA, }; DismissButton.Click += ButtonClick; ReleaseButton = new MirButton//Removes the selected pet { HoverIndex = 584, Index = 583, Location = new Point(255, 217), Library = Libraries.Title, Parent = this, PressedIndex = 585, Sound = SoundList.ButtonA, }; ReleaseButton.Click += ButtonClick; OptionsMenuButton = new MirButton//Options { HoverIndex = 574, Index = 573, Location = new Point(375, 160), Library = Libraries.Title, Parent = this, PressedIndex = 575, Sound = SoundList.ButtonA, }; OptionsMenuButton.Click += ButtonClick; AutomaticModeButton = new MirButton//image is wrongly translated should be "Auto" instaid of "Enable" { HoverIndex = 611, Index = 610, Location = new Point(375, 187), Library = Libraries.Title, Parent = this, PressedIndex = 612, Sound = SoundList.ButtonA, }; AutomaticModeButton.Click += ButtonClick; SemiAutoModeButton = new MirButton//image is wrongly translated should be "SemiAuto" instaid of "Disable" { HoverIndex = 614, Index = 613, Location = new Point(375, 187), Library = Libraries.Title, Parent = this, PressedIndex = 615, Sound = SoundList.ButtonA, }; SemiAutoModeButton.Click += ButtonClick; CreatureButtons = new CreatureButton[10]; for (int i = 0; i < CreatureButtons.Length; i++) { int offsetX = i * 81; int offsetY = 259; if (i >= 5) { offsetX = (i - 5) * 81; offsetY += 40; } CreatureButtons[i] = new CreatureButton { idx = i, Parent = this, Visible = false, Location = new Point((44 + offsetX), offsetY) }; } #endregion #region CreatureImage CreatureImage = new MirAnimatedControl { Animated = false, AnimationCount = 4, AnimationDelay = 250, Index = 0, Library = Libraries.Prguse2, Loop = true, Parent = this, NotControl = true, UseOffSet = true, Location = new Point(50, 110), }; FullnessBG = new MirImageControl { Index = 530, Library = Libraries.Prguse2, Location = new Point(185, 129), Parent = this, NotControl = true, }; FullnessBG.MouseEnter += Control_MouseEnter; FullnessBG.MouseLeave += Control_MouseLeave; FullnessFG = new MirImageControl { Index = 531, Library = Libraries.Prguse2, Location = new Point(185, 129), Parent = this, DrawImage = false, //NotControl = true, }; FullnessFG.AfterDraw += FullnessForeGround_AfterDraw; FullnessFG.MouseEnter += Control_MouseEnter; FullnessFG.MouseLeave += Control_MouseLeave; FullnessMin = new MirImageControl { Index = 532, Library = Libraries.Prguse2, Location = new Point(179, 118), Parent = this, //Visible = false, //NotControl = true, }; FullnessMin.MouseEnter += Control_MouseEnter; FullnessMin.MouseLeave += Control_MouseLeave; FullnessNow = new MirImageControl { Index = 533, Library = Libraries.Prguse2, Location = new Point(179, 143), Parent = this, //Visible = false, NotControl = true, }; PearlImage = new MirImageControl { Index = 427, Library = Libraries.Prguse2, Location = new Point(29, 348), Parent = this, NotControl = true, }; BlackStoneImageBG = new MirImageControl { Index = 428, Library = Libraries.Prguse2, Location = new Point(215, 348), Parent = this, Visible = true, NotControl = true, }; BlackStoneImageBG.MouseEnter += Control_MouseEnter; BlackStoneImageBG.MouseLeave += Control_MouseLeave; BlackStoneImageFG = new MirImageControl { Index = 420, Library = Libraries.Prguse2, Location = new Point(242, 353), Parent = this, Visible = true, DrawImage = false, //NotControl = true, }; BlackStoneImageFG.AfterDraw += BlackStoneImageFG_AfterDraw; BlackStoneImageFG.MouseEnter += Control_MouseEnter; BlackStoneImageFG.MouseLeave += Control_MouseLeave; #endregion #region CreatureLabels CreatureName = new MirLabel { Parent = this, Location = new Point(170, 50), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Size = new Size(166, 21), NotControl = true, }; CreatureDeadline = new MirLabel { Parent = this, Location = new Point(140, 85), DrawFormat = TextFormatFlags.VerticalCenter, Size = new Size(350, 21), NotControl = true, }; CreaturePearls = new MirLabel { AutoSize = true, Parent = this, Location = new Point(53, 348), DrawFormat = TextFormatFlags.VerticalCenter, //Size = new Size(350, 21), Text = "0", NotControl = true, }; CreatureInfo = new MirLabel { Parent = this, Location = new Point(19, 161), DrawFormat = TextFormatFlags.VerticalCenter, Size = new Size(350, 15), NotControl = true, }; CreatureInfo1 = new MirLabel { Parent = this, Location = new Point(19, 176), DrawFormat = TextFormatFlags.VerticalCenter, Size = new Size(350, 15), NotControl = true, }; CreatureInfo2 = new MirLabel { Parent = this, Location = new Point(19, 191), DrawFormat = TextFormatFlags.VerticalCenter, Size = new Size(350, 15), NotControl = true, }; CreatureMaintainFoodBuff = new MirLabel { Parent = this, Location = new Point(25, 25), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Size = new Size(166, 21), NotControl = true, Visible = false //FAR made invisible as position was wierd - not sure where it's meant to be displayed }; HoverLabel = new MirLabel { Parent = this, Location = new Point(0, 0), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Size = new Size(100, 15), NotControl = true, }; #endregion }
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 CreatureButton() { Size = new Size(231, 33); PetButton = new MirButton { Index = 0, PressedIndex = 1, Library = Libraries.Prguse2, Parent = this, Location = new Point(0, 0), Sound = SoundList.ButtonA, }; PetButton.Click += PetButtonClick; PetButton.MouseEnter += PetButtonMouseEnter; PetButton.MouseLeave += PetButtonMouseLeave; SelectionImage = new MirImageControl { Index = 535, Library = Libraries.Prguse2, Location = new Point(-2, -2), Parent = this, NotControl = true, Visible = false, }; NameLabel = new MirLabel { Parent = this, Location = new Point(-22, -12), DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter, Size = new Size(80, 15), NotControl = true, Visible = false, }; }
public IntelligentCreatureOptionsDialog() { Index = 469; Library = Libraries.Title; Movable = false; Sort = true; Location = new Point(GameScene.Scene.IntelligentCreatureDialog.Location.X + locationOffset.X, GameScene.Scene.IntelligentCreatureDialog.Location.Y + locationOffset.Y); BeforeDraw += IntelligentCreatureOptionsDialog_BeforeDraw; CreatureOptions = new MirCheckBox[9]; for (int i = 0; i < CreatureOptions.Length; i++) { int offsetY = i * 30; CreatureOptions[i] = new MirCheckBox { Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(16, (16 + offsetY)), Library = Libraries.Prguse }; CreatureOptions[i].LabelText = OptionNames[i]; CreatureOptions[i].Click += CheckBoxClick; } OptionsSaveButton = new MirButton { HoverIndex = 587, Index = 586, Location = new Point(10, 280), Library = Libraries.Title, Parent = this, PressedIndex = 588, Sound = SoundList.ButtonA, }; OptionsSaveButton.Click += ButtonClick; OptionsCancelButton = new MirButton { HoverIndex = 591, Index = 590, Location = new Point(60, 280), Library = Libraries.Title, Parent = this, PressedIndex = 592, Sound = SoundList.ButtonA, }; OptionsCancelButton.Click += ButtonClick; }
public MirAmountBox(string title, int image, uint max, uint min = 0) { ImageIndex = image; MaxAmount = max; MinAmount = min; Amount = max; Modal = true; Movable = false; Index = 660; Library = Libraries.Prguse; Location = new Point((800 - Size.Width) / 2, (600 - Size.Height) / 2); TitleLabel = new MirLabel { AutoSize = true, Location = new Point(19 + 2, 8 + 15 + 3), Parent = this, NotControl = true, Text = title }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(180, 23), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, Visible = false, }; CloseButton.Click += (o, e) => Dispose(); ItemImage = new MirControl { Location = new Point(15, 34), Size = new Size(38, 34), Parent = this, Visible = false, }; ItemImage.AfterDraw += (o, e) => DrawItem(); OKButton = new MirButton { HoverIndex = 383, Index = 382, Library = Libraries.Title, Location = new Point(23 + 120, 76 + 47), Parent = this, PressedIndex = 384, }; OKButton.Click += (o, e) => Dispose(); CancelButton = new MirButton { HoverIndex = 386, Index = 385, Library = Libraries.Title, Location = new Point(110 + 100, 76 + 47), Parent = this, PressedIndex = 387, }; CancelButton.Click += (o, e) => Dispose(); InputTextBox = new MirTextBox { Parent = this, Border = true, BorderColour = Color.Lime, Location = new Point(59 - 37 + 2, 43 + 40 + 4), Size = new Size(238, 19), }; InputTextBox.SetFocus(); //InputTextBox.Font = new Font(Settings.FontName, 10); InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress; InputTextBox.TextBox.TextChanged += TextBox_TextChanged; InputTextBox.Text = MaxAmount.ToString(); InputTextBox.TextBox.SelectionStart = 0; InputTextBox.TextBox.SelectionLength = InputTextBox.Text.Length; }