Exemple #1
0
        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();
                    Settings.DuraView = false;
                }
                else
                {
                    GameScene.Scene.CharacterDuraPanel.Show();
                    Settings.DuraView = true;
                }
            };
        }
Exemple #2
0
        public void MakeButtons(List <WorldMapIcon> icons)
        {
            foreach (WorldMapIcon icon in icons)
            {
                MirButton button = new MirButton()
                {
                    Index              = icon.ImageIndex,
                    UseOffSet          = true,
                    Library            = Libraries.MapLinkIcon,
                    Parent             = this,
                    Sound              = SoundList.ButtonA,
                    OnlyDrawWhenActive = true
                };

                button.Click += (o, e) =>
                {
                    GameScene.Scene.BigMapDialog.SetTargetMap(icon.MapIndex);
                };
                button.MouseEnter += (o, e) =>
                {
                    TitleLabel.Text     = icon.Title;
                    TitleLabel.Location = new Point(Size.Width / 2 - TitleLabel.Size.Width / 2, 10);
                };
                button.MouseLeave += (o, e) =>
                {
                    TitleLabel.Text = string.Empty;
                };

                ButtonList.Add(button);
            }
        }
Exemple #3
0
        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();
        }
Exemple #4
0
        public HeroBehaviourPanel()
        {
            AutoSize  = false;
            Size      = new Size(64, 17);
            DrawImage = false;
            Location  = new Point(GameScene.Scene.MainDialog.Location.X + 165, GameScene.Scene.MainDialog.Location.Y + 37);

            BehaviourButtons = new MirButton[4];

            for (int i = 0; i < BehaviourButtons.Length; i++)
            {
                HeroBehaviour hb = (HeroBehaviour)i;
                BehaviourButtons[i] = new MirButton
                {
                    Index                  = 1840 + i,
                    DisabledIndex          = 1844 + i,
                    Location               = new Point(16 * i, 0),
                    Library                = Libraries.Prguse,
                    Parent                 = this,
                    Sound                  = SoundList.ButtonA,
                    Hint                   = $"Hero Behaviour: {Enum.GetName(typeof(HeroBehaviour), i)}",
                    AllowDisabledMouseOver = true
                };
                BehaviourButtons[i].Click += (o, e) =>
                {
                    SetBehaviour(hb);
                };
            }
        }
Exemple #5
0
        public TransformBackDialog()
        {
            Index    = 537;
            Library  = Libraries.Prguse;
            Movable  = false;
            Sort     = true;
            Location = new Point(247, 224);

            TransformButton = new MirButton
            {
                Index        = 496,
                HoverIndex   = 497,
                PressedIndex = 498,
                Library      = Libraries.Title,
                Location     = new Point(70, 134),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            TransformButton.Click += (o, e) => Transform_Click();

            CloseButton = new MirButton
            {
                Index        = 360,
                HoverIndex   = 361,
                PressedIndex = 362,
                Location     = new Point(170, 1),
                Library      = Libraries.Prguse2,
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            Title = new MirImageControl
            {
                Index      = 44,
                Library    = Libraries.Title,
                Location   = new Point(30, 5),
                Parent     = this,
                NotControl = true,
            };

            ItemBox = new MirImageControl
            {
                Index      = 989,
                Library    = Libraries.Prguse,
                Location   = new Point(75, 61),
                Parent     = this,
                NotControl = true,
            };

            ItemCell = new MirItemCell
            {
                BorderColour = Color.Lime,
                GridType     = MirGridType.TransformBack,
                Library      = Libraries.Items,
                Parent       = this,
                Location     = new Point(75, 61),
                ItemSlot     = 0,
            };
        }
        public KeyboardLayoutDialog()
        {
            Index    = 920;
            Library  = Libraries.Prguse;
            Movable  = true;
            Sort     = true;
            Location = Center;


            TitleLabel = new MirImageControl
            {
                // Index = 7,
                Library  = Libraries.Title,
                Location = new Point(18, 8),
                Parent   = this
            };

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(509, 3),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();
        }
Exemple #7
0
        public HeroStashDialog()
        {
            Index    = 1688;
            Library  = Libraries.Prguse;
            Visible  = true;
            Location = new System.Drawing.Point(Settings.ScreenWidth / 2 - 160, Settings.ScreenHeight / 2 - 80);

            Label = new MirLabel
            {
                Location   = new Point(140, 5),
                AutoSize   = true,
                Parent     = this,
                BackColour = Color.Transparent,
                ForeColour = Color.Goldenrod,
                Font       = new Font(Settings.FontName, 10F),
                NotControl = true,
                Text       = "Hero Stash",
            };

            CloseButton = new MirButton
            {
                Location     = new Point(330, 4),
                Index        = 360,
                HoverIndex   = 361,
                PressedIndex = 362,
                Library      = Libraries.Prguse2,
                Visible      = true,
                Parent       = this,
                Hint         = "Close"
            };
            CloseButton.Click += (o, e) =>
            {
                if (Visible)
                {
                    Hide();
                }
            };

            Chosen = new HeroIcon()
            {
                Location = new Point(20, 65),
                Visible  = true,
                Parent   = this,
                Enabled  = true,
            };

            for (int i = 0; i < Icons.Length; i++)
            {
                Icons[i] = new HeroIcon()
                {
                    Location = new Point(99 + (i % 4 * 60), 61 + (i / 4 * 41)),
                    Visible  = true,
                    Parent   = this,
                    Border   = true,
                };
                Icons[i].BeforeDraw += HeroStashDialog_BeforeDraw;
            }
        }
        public LoginBox()
        {
            VerticalAlignment   = VerticalAlignment.Bottom;
            HorizontalAlignment = HorizontalAlignment.Center;
            Top = -100;

            var background = new MirImageBrush()
            {
                Index   = 2,
                Library = Mir.Models.LibraryType.Interface1c
            };

            Background = background;
            Width      = background.Size.X;
            Height     = background.Size.Y;

            Widgets.Add(_idField = new TextBox
            {
                Id         = "txt_id",
                Left       = 68,
                Top        = 64,
                Width      = 184,
                Height     = 16,
                Background = new SolidBrush(Color.Transparent),
                Font       = Fonts.Size8
            });
            _idField.KeyDown += IdField_KeyDown;
            _idField.SetKeyboardFocus();

            Widgets.Add(_passField = new TextBox
            {
                Id            = "txt_pass",
                Left          = 355,
                Top           = 64,
                Width         = 184,
                Height        = 16,
                PasswordField = true,
                Background    = new SolidBrush(Color.Transparent),
                Font          = Fonts.Size8
            });

            Widgets.Add(_loginButton = new MirButton()
            {
                Text = "Login",
                Left = 550,
                Top  = 60,
            });
            _loginButton.Click += LoginButton_Click;

            Widgets.Add(_exitButton = new MirButton()
            {
                Text = "Close",
                Left = 680,
                Top  = 60,
            });
            _exitButton.Click += ExitButton_Click;
        }
Exemple #9
0
        public HumupTransformDialog()
        {
            Index    = 661;
            Library  = Libraries.Prguse;
            Movable  = false;
            Sort     = true;
            Location = new Point(125, 224);

            TransformButton = new MirButton
            {
                Index        = 496,
                HoverIndex   = 497,
                PressedIndex = 498,
                Library      = Libraries.Title,
                Location     = new Point(132, 177),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            TransformButton.Click += (o, e) => Transform_Click();

            CloseButton = new MirButton
            {
                Index        = 360,
                HoverIndex   = 361,
                PressedIndex = 362,
                Location     = new Point(286, 5),
                Library      = Libraries.Prguse2,
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            Title = new MirImageControl
            {
                Index      = 44,
                Library    = Libraries.Title,
                Location   = new Point(20, 5),
                Parent     = this,
                NotControl = true,
            };

            for (int i = 0; i < ItemCells.Length; i++)
            {
                ItemCells[i] = new MirItemCell
                {
                    BorderColour = Color.Lime,
                    GridType     = MirGridType.HumupTransform,
                    Library      = Libraries.Items,
                    Parent       = this,
                    Location     = new Point(51 + i * 35, 56),
                    ItemSlot     = i,
                    Size         = new Size(35, 31)
                };
            }
        }
Exemple #10
0
        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;
        }
Exemple #11
0
            public RankingRow()
            {
                Sound        = SoundList.ButtonA;
                BorderColour = Color.Lime;
                Visible      = false;
                Click       += Inspect;

                RankLabel = new MirLabel
                {
                    Location   = new Point(0, 0),
                    AutoSize   = true,
                    DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                    Parent     = this,
                    NotControl = true,
                };
                NameLabel = new MirLabel
                {
                    Location   = new Point(55, 0),
                    AutoSize   = true,
                    DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                    Parent     = this,
                    NotControl = true,
                };

                ClassLabel = new MirLabel
                {
                    Location   = new Point(150, 0),
                    AutoSize   = true,
                    DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                    Parent     = this,
                    NotControl = true,
                };

                LevelLabel = new MirLabel
                {
                    Location   = new Point(220, 0),
                    AutoSize   = true,
                    DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                    Parent     = this,
                    NotControl = true,
                };

                ViewButton = new MirButton
                {
                    Index        = 805,
                    HoverIndex   = 806,
                    PressedIndex = 807,
                    Library      = Libraries.Title,
                    Location     = new Point(280, 3),
                    Parent       = this,
                    Sound        = SoundList.ButtonA,
                };
                ViewButton.Click += (o, e) => Observe();
            }
Exemple #12
0
        public KeybindRow(KeybindOptions option)
        {
            KeyBind defaultBind = CMain.InputKeys.DefaultKeylist.Single(x => x.function == option);
            KeyBind currentBind = CMain.InputKeys.Keylist.Single(x => x.function == option);

            KeyBind = currentBind;

            BindName = new MirLabel
            {
                Parent   = this,
                Size     = new Size(200, 15),
                Location = new Point(0, 0),
                Text     = defaultBind.Description,
                Visible  = true
            };

            DefaultBind = new MirLabel
            {
                Parent   = this,
                Size     = new Size(100, 15),
                Location = new Point(200, 0),
                Text     = CMain.InputKeys.GetKey(option, true),
                Visible  = true
            };

            CurrentBindButton = new MirButton
            {
                Parent       = this,
                Text         = string.Format("  {0}", CMain.InputKeys.GetKey(option, false)),
                Location     = new Point(340, 0),
                Size         = new Size(120, 16),
                Visible      = true,
                Index        = 190,
                Library      = Libraries.Prguse2,
                HoverIndex   = 191,
                PressedIndex = 192
            };
            CurrentBindButton.Click += (o, e) =>
            {
                if (GameScene.Scene.KeyboardLayoutDialog.WaitingForBind != null)
                {
                    GameScene.Scene.KeyboardLayoutDialog.WaitingForBind = null;
                    GameScene.Scene.KeyboardLayoutDialog.UpdateText();
                    return;
                }

                GameScene.Scene.KeyboardLayoutDialog.WaitingForBind = KeyBind;

                ((MirButton)o).Text         = string.Format("  {0}", "????");
                ((MirButton)o).Index        = 192;
                ((MirButton)o).HoverIndex   = 192;
                ((MirButton)o).PressedIndex = 192;
            };
        }
Exemple #13
0
        public static void Create()
        {
            Window = new MirImageControl
            {
                Index    = 1932,
                Library  = Libraries.Prguse,
                Parent   = GameScene.Scene,
                Movable  = true,
                Sort     = true,
                Visible  = true,
                Location = new Point(230, 450)
            };
            Window.BeforeDraw += new EventHandler(Window_BeforeDraw);

            RotateButton = new MirButton
            {
                HoverIndex   = 1927,
                Index        = 1926,
                Location     = new Point(222, 3),
                Library      = Libraries.Prguse,
                Parent       = Window,
                PressedIndex = 1928,
                Sound        = SoundList.ClickA,
            };
            CloseButton = new MirButton
            {
                HoverIndex   = 1924,
                Index        = 1923,
                Location     = new Point(222, 19),
                Library      = Libraries.Prguse,
                Parent       = Window,
                PressedIndex = 1925,
                Sound        = SoundList.ClickA,
            };

            Grid = new MirItemCell[6];

            for (int X = 0; X < 6; X++)
            {
                Grid[X] = new MirItemCell
                {
                    ItemSlot    = 40 + X, //
                    Size        = new Size(32, 32),
                    BorderColor = Color.Lime,
                    GridType    = MirGridType.Inventory,
                    Library     = Libraries.Items,
                    Parent      = Window,
                    Location    = new Point(X * 35 + 12, 3),
                };
            }
        }
Exemple #14
0
        public BuffDialog()
        {
            Index    = 20;
            Library  = Libraries.Prguse2;
            Movable  = false;
            Size     = new Size(44, 34);
            Location = new Point(Settings.ScreenWidth - 170, 0);
            Sort     = true;

            Opacity   = 0f;
            _fadedOut = true;

            _expandCollapseButton = new MirButton
            {
                Index        = 7,
                HoverIndex   = 8,
                Size         = new Size(16, 15),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 9,
                Sound        = SoundList.ButtonA,
                Opacity      = 0f
            };
            _expandCollapseButton.Click += (o, e) =>
            {
                if (_buffCount == 1)
                {
                    Settings.ExpandedBuffWindow = true;
                }
                else
                {
                    Settings.ExpandedBuffWindow = !Settings.ExpandedBuffWindow;
                }

                UpdateWindow();
            };

            _buffCountLabel = new MirLabel
            {
                Parent        = this,
                AutoSize      = true,
                DrawFormat    = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                Font          = new Font(Settings.FontName, 10F, FontStyle.Bold),
                NotControl    = true,
                Sort          = true,
                Visible       = false,
                ForeColour    = Color.Yellow,
                OutLineColour = Color.Black,
            };
        }
Exemple #15
0
        public GuestItemRentDialog()
        {
            Index    = 238;
            Library  = Libraries.Prguse;
            Movable  = true;
            Size     = new Size(204, 109);
            Location = new Point(Settings.ScreenWidth - Size.Width - Size.Width / 2, Size.Height + Size.Height / 2);
            Sort     = true;

            _lockButton = new MirButton
            {
                Index    = 250,
                Location = new Point(22, 76),
                Size     = new Size(28, 25),
                Library  = Libraries.Prguse,
                Parent   = this,
                Enabled  = false
            };

            _rentalPriceButton = new MirButton
            {
                Index    = 28,
                Location = new Point(18, 46),
                Size     = new Size(32, 17),
                Library  = Libraries.Prguse,
                Parent   = this,
                Enabled  = false
            };

            _nameLabel = new MirLabel
            {
                Parent     = this,
                Location   = new Point(30, 8),
                Size       = new Size(150, 14),
                DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                NotControl = true,
            };

            _rentalPriceLabel = new MirLabel
            {
                Parent     = this,
                Location   = new Point(60, 42),
                Size       = new Size(150, 14),
                DrawFormat = TextFormatFlags.Left | TextFormatFlags.VerticalCenter,
                NotControl = true,
            };
        }
        public BossInfoDialog()
        {
            Index      = 990;
            Library    = Libraries.Prguse;
            Visible    = true;
            Location   = new System.Drawing.Point(Settings.ScreenWidth / 2 - 160, 0);
            Opacity    = 0.75f;
            NotControl = true;

            mobImage = new MirImageControl
            {
                NotControl = true,
                Parent     = this,
                Visible    = true,
                Location   = new Point(15, 15),
                Library    = Libraries.MobImage,
                GrayScale  = true,              //  Add a grey scale to the image? :D
            };
            mobLabel = new MirLabel
            {
                BackColour = Color.Transparent,
                OutLine    = false,
                ForeColour = Color.Goldenrod,
                Parent     = this,
                NotControl = true,
                Location   = new Point(110, 15),
                AutoSize   = true
            };
            CloseButton = new MirButton
            {
                Location     = new Point(120, 100),
                Index        = 316,
                HoverIndex   = 315,
                PressedIndex = 317,
                Library      = Libraries.Title,
                Visible      = false,
                Parent       = this
            };
            CloseButton.Click += (o, e) =>
            {
                if (Visible)
                {
                    Hide();
                }
            };
        }
Exemple #17
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                CoordinateLabel  = null;
                CloseButton      = null;
                ScrollUpButton   = null;
                ScrollDownButton = null;
                ScrollBar        = null;
                WorldButton      = null;
                MyLocationButton = null;
                TeleportToButton = null;
                SearchButton     = null;
                SearchTextBox    = null;
                TitleLabel       = null;
            }

            base.Dispose(disposing);
        }
Exemple #18
0
        public LMS_BR_SignupDialog()
        {
            Index    = 990;
            Library  = Libraries.Prguse;
            Location = new Point(Settings.ScreenWidth / 2 - Size.Width / 2, Settings.ScreenHeight / 2 - Size.Height / 2);

            MatchesAvailable = new MirButton
            {
                Parent       = this,
                PressedIndex = 302,
                CenterText   = true,
                Location     = new Point(33, 38),
                Size         = new Size(240, 18),
                Text         = "",
                Border       = true
            };
            MatchesAvailable.Click += MatchesAvailable_Click;

            CloseButton = new MirButton
            {
                Index        = 361,
                HoverIndex   = 362,
                PressedIndex = 363,
                Location     = new Point(65, 6),
                Library      = Libraries.CustomPrguse,
                Sound        = SoundList.ButtonA,
                Parent       = this,
            };
            CloseButton.Click += (o, e) => Hide();

            /*
             * BRRankingButton = new MirButton
             * {
             *  Location = new Point(58, 309),
             *  Size = new Size(75, 18),
             *  Text = "Rankings",
             *  Sound = SoundList.ButtonA,
             *  CenterText = true,
             *  Parent = this
             * };*/
        }
        //private readonly MirLabel _nameLabel, _rentalPriceLabel;
        //private readonly MirButton _lockButton, _rentalPriceButton;

        public ItemRentDialog()
        {
            Index    = 238;
            Library  = Libraries.Prguse;
            Movable  = true;
            Size     = new Size(204, 109);
            Location = new Point(Settings.ScreenWidth - Size.Width - Size.Width / 2, Size.Height + Size.Height / 2);
            Sort     = true;

            var closeButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(180, 3),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            //closeButton.Click += (sender, args) =>
        }
Exemple #20
0
 public AddSocketDialog()
 {
     ConfirmButton = new MirButton
     {
         Parent = this,
     };
     ConfirmButton.Click += ConfirmButton_Click;
     CloseButton          = new MirButton
     {
         Parent = this,
     };
     CloseButton.Click += (o, e) => Hide();
     HammerContainer    = new MirImageControl
     {
         Index    = 989,
         Library  = Libraries.Prguse,
         Parent   = this,
         Location = new Point(100, 18),
     };
     HammerCell = new MirItemCell
     {
         GridType = MirGridType.AddSocket,
         Parent   = HammerContainer,
         CellType = 0
     };
     ItemContainer = new MirImageControl
     {
         Index    = 989,
         Library  = Libraries.Prguse,
         Parent   = this,
         Location = new Point(100, 18),
     };
     ItemCell = new MirItemCell
     {
         GridType = MirGridType.AddSocket,
         Parent   = ItemContainer,
         CellType = 1
     };
 }
Exemple #21
0
        public SocketDialog()
        {
            Index    = 20;
            Library  = Libraries.Prguse3;
            Movable  = true;
            Sort     = true;
            Location = new Point(0, 0);

            Grid = new MirItemCell[6 * 2];

            for (int x = 0; x < 6; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    int idx = 6 * y + x;

                    Grid[idx] = new MirItemCell
                    {
                        ItemSlot = idx,
                        GridType = MirGridType.Socket,
                        Library  = Libraries.Items,
                        Parent   = this,
                        Location = new Point(x * 36 + 23 + x, y * 33 + 15 + y),
                    };
                }
            }

            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();
        }
Exemple #22
0
        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);
        }
Exemple #23
0
        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();
        }
Exemple #24
0
 public KeyBindObject()
 {
     Title = new MirLabel
     {
         Text       = "test",
         Location   = new Point(0, 0),
         Parent     = this,
         AutoSize   = true,
         DrawFormat = TextFormatFlags.Default,
         Font       = new Font(Settings.FontName, 9f),
         ForeColour = Color.White,
         NotControl = true
     };
     DefaultKey = new MirLabel
     {
         Text       = "test",
         Location   = new Point(210, 0),
         Parent     = this,
         AutoSize   = true,
         DrawFormat = TextFormatFlags.Default,
         Font       = new Font(Settings.FontName, 9f),
         ForeColour = Color.White,
         NotControl = true
     };
     AnySettingKey = new MirButton
     {
         Parent       = this,
         Location     = new Point(340, 0),
         Library      = Libraries.Prguse,
         Index        = 1811,
         HoverIndex   = 1810,
         PressedIndex = 1810
     };
     AnySettingKey.Click     += new EventHandler(AnySettingKey_Clicked);
     AnySettingKey.CenterText = true;
 }
Exemple #25
0
        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);
                Network.Enqueue(new C.TradeConfirm {
                    Locked = 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
        }
Exemple #26
0
        public CharacterDialog()
        {
            Index    = 504;
            Library  = Libraries.Title;
            Location = new Point(Settings.ScreenWidth - 264, 0);
            Movable  = true;
            Sort     = true;

            BeforeDraw += (o, e) => RefreshInterface();

            CharacterPage = new MirImageControl
            {
                Index    = 340,
                Parent   = this,
                Library  = Libraries.Prguse,
                Location = new Point(8, 90),
            };
            CharacterPage.AfterDraw += (o, e) =>
            {
                if (Libraries.StateItems == null)
                {
                    return;
                }
                ItemInfo RealItem = null;
                if (Grid[(int)EquipmentSlot.Armour].Item != null)
                {
                    if (GameScene.User.WingEffect == 1 || GameScene.User.WingEffect == 2)
                    {
                        int wingOffset = GameScene.User.WingEffect == 1 ? 2 : 4;

                        int genderOffset = MapObject.User.Gender == MirGender.Male ? 0 : 1;

                        Libraries.Prguse2.DrawBlend(1200 + wingOffset + genderOffset, DisplayLocation, Color.White, true, 1F);
                    }

                    RealItem = Functions.GetRealItem(Grid[(int)EquipmentSlot.Armour].Item.Info, MapObject.User.Level, MapObject.User.Class, GameScene.ItemInfoList);
                    Libraries.StateItems.Draw(RealItem.Image, DisplayLocation, Color.White, true, 1F);
                }
                if (Grid[(int)EquipmentSlot.Weapon].Item != null)
                {
                    RealItem = Functions.GetRealItem(Grid[(int)EquipmentSlot.Weapon].Item.Info, MapObject.User.Level, MapObject.User.Class, GameScene.ItemInfoList);
                    Libraries.StateItems.Draw(RealItem.Image, DisplayLocation, Color.White, true, 1F);
                }

                if (Grid[(int)EquipmentSlot.Helmet].Item != null)
                {
                    Libraries.StateItems.Draw(Grid[(int)EquipmentSlot.Helmet].Item.Info.Image, DisplayLocation, Color.White, true, 1F);
                }
                else
                {
                    if (MapObject.User.Class == MirClass.Monk)
                    {
                        return;
                    }

                    int hair = 441 + MapObject.User.Hair + (MapObject.User.Class == MirClass.Assassin ? 20 : 0) + (MapObject.User.Gender == MirGender.Male ? 0 : 40);

                    int offSetX = MapObject.User.Class == MirClass.Assassin ? (MapObject.User.Gender == MirGender.Male ? 6 : 4) : 0;
                    int offSetY = MapObject.User.Class == MirClass.Assassin ? (MapObject.User.Gender == MirGender.Male ? 25 : 18) : 0;

                    Libraries.Prguse.Draw(hair, new Point(DisplayLocation.X + offSetX, DisplayLocation.Y + offSetY), Color.White, true, 1F);
                }
            };

            StatusPage = new MirImageControl
            {
                Index    = 506,
                Parent   = this,
                Library  = Libraries.Title,
                Location = new Point(8, 90),
                Visible  = false,
            };
            StatusPage.BeforeDraw += (o, e) =>
            {
                ACLabel.Text      = string.Format("{0}-{1}", MapObject.User.MinAC, MapObject.User.MaxAC);
                MACLabel.Text     = string.Format("{0}-{1}", MapObject.User.MinMAC, MapObject.User.MaxMAC);
                DCLabel.Text      = string.Format("{0}-{1}", MapObject.User.MinDC, MapObject.User.MaxDC);
                MCLabel.Text      = string.Format("{0}-{1}", MapObject.User.MinMC, MapObject.User.MaxMC);
                SCLabel.Text      = string.Format("{0}-{1}", MapObject.User.MinSC, MapObject.User.MaxSC);
                HealthLabel.Text  = string.Format("{0}/{1}", MapObject.User.HP, MapObject.User.MaxHP);
                ManaLabel.Text    = string.Format("{0}/{1}", MapObject.User.MP, MapObject.User.MaxMP);
                CritRLabel.Text   = string.Format("{0}%", MapObject.User.CriticalRate);
                CritDLabel.Text   = string.Format("{0}", MapObject.User.CriticalDamage);
                AttkSpdLabel.Text = string.Format("{0}", MapObject.User.ASpeed);
                AccLabel.Text     = string.Format("+{0}", MapObject.User.Accuracy);
                AgilLabel.Text    = string.Format("+{0}", MapObject.User.Agility);
                LuckLabel.Text    = string.Format("{0}", MapObject.User.Luck);
            };

            StatePage = new MirImageControl
            {
                Index    = 507,
                Parent   = this,
                Library  = Libraries.Title,
                Location = new Point(8, 90),
                Visible  = false
            };
            StatePage.BeforeDraw += (o, e) =>
            {
                ExpPLabel.Text      = string.Format("{0}/{1}", MapObject.User.Experience, (double)MapObject.User.MaxExperience);
                BagWLabel.Text      = string.Format("{0}/{1}", MapObject.User.CurrentBagWeight, MapObject.User.MaxBagWeight);
                WearWLabel.Text     = string.Format("{0}/{1}", MapObject.User.CurrentWearWeight, MapObject.User.MaxWearWeight);
                HandWLabel.Text     = string.Format("{0}/{1}", MapObject.User.CurrentHandWeight, MapObject.User.MaxHandWeight);
                MagicRLabel.Text    = string.Format("+{0}", MapObject.User.MagicResist);
                PoisonResLabel.Text = string.Format("+{0}", MapObject.User.PoisonResist);
                HealthRLabel.Text   = string.Format("+{0}", MapObject.User.HealthRecovery);
                ManaRLabel.Text     = string.Format("+{0}", MapObject.User.SpellRecovery);
                PoisonRecLabel.Text = string.Format("+{0}", MapObject.User.PoisonRecovery);
                HolyTLabel.Text     = string.Format("+{0}", MapObject.User.Holy);
                FreezeLabel.Text    = string.Format("+{0}", MapObject.User.Freezing);
                PoisonAtkLabel.Text = string.Format("+{0}", MapObject.User.PoisonAttack);
            };


            SkillPage = new MirImageControl
            {
                Index    = 508,
                Parent   = this,
                Library  = Libraries.Title,
                Location = new Point(8, 90),
                Visible  = false
            };


            CharacterButton = new MirButton
            {
                Index        = 500,
                Library      = Libraries.Title,
                Location     = new Point(8, 70),
                Parent       = this,
                PressedIndex = 500,
                Size         = new Size(64, 20),
                Sound        = SoundList.ButtonA,
            };
            CharacterButton.Click += (o, e) => ShowCharacterPage();
            StatusButton           = new MirButton
            {
                Library      = Libraries.Title,
                Location     = new Point(70, 70),
                Parent       = this,
                PressedIndex = 501,
                Size         = new Size(64, 20),
                Sound        = SoundList.ButtonA
            };
            StatusButton.Click += (o, e) => ShowStatusPage();

            StateButton = new MirButton
            {
                Library      = Libraries.Title,
                Location     = new Point(132, 70),
                Parent       = this,
                PressedIndex = 502,
                Size         = new Size(64, 20),
                Sound        = SoundList.ButtonA
            };
            StateButton.Click += (o, e) => ShowStatePage();

            SkillButton = new MirButton
            {
                Library      = Libraries.Title,
                Location     = new Point(194, 70),
                Parent       = this,
                PressedIndex = 503,
                Size         = new Size(64, 20),
                Sound        = SoundList.ButtonA
            };
            SkillButton.Click += (o, e) => ShowSkillPage();

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(241, 3),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            NameLabel = new MirLabel
            {
                DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter,
                Parent     = this,
                Location   = new Point(0, 12),
                Size       = new Size(264, 20),
                NotControl = true,
            };
            GuildLabel = new MirLabel
            {
                DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter,
                Parent     = this,
                Location   = new Point(0, 33),
                Size       = new Size(264, 30),
                NotControl = true,
            };
            ClassImage = new MirImageControl
            {
                Index      = 100,
                Library    = Libraries.Prguse,
                Location   = new Point(15, 33),
                Parent     = this,
                NotControl = true,
            };

            Grid = new MirItemCell[Enum.GetNames(typeof(EquipmentSlot)).Length];

            Grid[(int)EquipmentSlot.Weapon] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Weapon,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(123, 7),
            };


            Grid[(int)EquipmentSlot.Armour] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Armour,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(163, 7),
            };


            Grid[(int)EquipmentSlot.Helmet] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Helmet,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(203, 7),
            };



            Grid[(int)EquipmentSlot.Torch] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Torch,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(203, 134),
            };


            Grid[(int)EquipmentSlot.Necklace] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Necklace,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(203, 98),
            };


            Grid[(int)EquipmentSlot.BraceletL] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.BraceletL,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(8, 170),
            };

            Grid[(int)EquipmentSlot.BraceletR] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.BraceletR,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(203, 170),
            };

            Grid[(int)EquipmentSlot.RingL] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.RingL,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(8, 206),
            };

            Grid[(int)EquipmentSlot.RingR] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.RingR,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(203, 206),
            };


            Grid[(int)EquipmentSlot.Amulet] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Amulet,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(8, 242),
            };


            Grid[(int)EquipmentSlot.Boots] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Boots,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(48, 242),
            };

            Grid[(int)EquipmentSlot.Belt] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Belt,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(88, 242),
            };


            Grid[(int)EquipmentSlot.Stone] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Stone,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(128, 242),
            };

            Grid[(int)EquipmentSlot.Mount] = new MirItemCell
            {
                ItemSlot = (int)EquipmentSlot.Mount,
                GridType = MirGridType.Equipment,
                Parent   = CharacterPage,
                Location = new Point(203, 62),
            };

            // STATS I
            HealthLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 20),
                NotControl = true,
                Text       = "0-0",
            };

            ManaLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 38),
                NotControl = true,
                Text       = "0-0",
            };

            ACLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 56),
                NotControl = true,
                Text       = "0-0",
            };

            MACLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 74),
                NotControl = true,
                Text       = "0-0",
            };
            DCLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 92),
                NotControl = true,
                Text       = "0-0"
            };
            MCLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 110),
                NotControl = true,
                Text       = "0/0"
            };
            SCLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 128),
                NotControl = true,
                Text       = "0/0"
            };
            //Breezer - New Labels
            CritRLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 146),
                NotControl = true
            };
            CritDLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 164),
                NotControl = true
            };
            AttkSpdLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 182),
                NotControl = true
            };
            AccLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 200),
                NotControl = true
            };
            AgilLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 218),
                NotControl = true
            };
            LuckLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatusPage,
                Location   = new Point(126, 236),
                NotControl = true
            };
            // STATS II
            ExpPLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 20),
                NotControl = true,
                Text       = "0-0",
            };

            BagWLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 38),
                NotControl = true,
                Text       = "0-0",
            };

            WearWLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 56),
                NotControl = true,
                Text       = "0-0",
            };

            HandWLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 74),
                NotControl = true,
                Text       = "0-0",
            };
            MagicRLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 92),
                NotControl = true,
                Text       = "0-0"
            };
            PoisonResLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 110),
                NotControl = true,
                Text       = "0/0"
            };
            HealthRLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 128),
                NotControl = true,
                Text       = "0/0"
            };
            //Breezer
            ManaRLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 146),
                NotControl = true
            };
            PoisonRecLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 164),
                NotControl = true
            };
            HolyTLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 182),
                NotControl = true
            };
            FreezeLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 200),
                NotControl = true
            };
            PoisonAtkLabel = new MirLabel
            {
                AutoSize   = true,
                Parent     = StatePage,
                Location   = new Point(126, 218),
                NotControl = true
            };

            Magics = new MagicButton[7];

            for (int i = 0; i < Magics.Length; i++)
            {
                Magics[i] = new MagicButton {
                    Parent = SkillPage, Visible = false, Location = new Point(8, 8 + i * 33)
                }
            }
            ;

            NextButton = new MirButton
            {
                Index        = 396,
                Location     = new Point(140, 250),
                Library      = Libraries.Prguse,
                Parent       = SkillPage,
                PressedIndex = 397,
                Sound        = SoundList.ButtonA,
            };
            NextButton.Click += (o, e) =>
            {
                if (StartIndex + 7 >= MapObject.User.Magics.Count)
                {
                    return;
                }

                StartIndex += 7;
                RefreshInterface();

                ClearCoolDowns();
            };

            BackButton = new MirButton
            {
                Index        = 398,
                Location     = new Point(90, 250),
                Library      = Libraries.Prguse,
                Parent       = SkillPage,
                PressedIndex = 399,
                Sound        = SoundList.ButtonA,
            };
            BackButton.Click += (o, e) =>
            {
                if (StartIndex - 7 < 0)
                {
                    return;
                }

                StartIndex -= 7;
                RefreshInterface();

                ClearCoolDowns();
            };
        }
Exemple #27
0
        public HelpDialog()
        {
            Index   = 920;
            Library = Libraries.Prguse;
            Movable = true;
            Sort    = true;

            Location = Center;

            MirImageControl TitleLabel = new MirImageControl
            {
                Index    = 57,
                Library  = Libraries.Title,
                Location = new Point(18, 9),
                Parent   = this
            };

            PreviousButton = new MirButton
            {
                Index        = 240,
                HoverIndex   = 241,
                PressedIndex = 242,
                Library      = Libraries.Prguse2,
                Parent       = this,
                Size         = new Size(16, 16),
                Location     = new Point(210, 485),
                Sound        = SoundList.ButtonA,
            };
            PreviousButton.Click += (o, e) =>
            {
                CurrentPageNumber--;

                if (CurrentPageNumber < 0)
                {
                    CurrentPageNumber = Pages.Count - 1;
                }

                DisplayPage(CurrentPageNumber);
            };

            NextButton = new MirButton
            {
                Index        = 243,
                HoverIndex   = 244,
                PressedIndex = 245,
                Library      = Libraries.Prguse2,
                Parent       = this,
                Size         = new Size(16, 16),
                Location     = new Point(310, 485),
                Sound        = SoundList.ButtonA,
            };
            NextButton.Click += (o, e) =>
            {
                CurrentPageNumber++;

                if (CurrentPageNumber > Pages.Count - 1)
                {
                    CurrentPageNumber = 0;
                }

                DisplayPage(CurrentPageNumber);
            };

            PageLabel = new MirLabel
            {
                Text       = "",
                Font       = new Font(Settings.FontName, 9F),
                DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter,
                Parent     = this,
                NotControl = true,
                Location   = new Point(230, 480),
                Size       = new Size(80, 20)
            };

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(509, 3),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            LoadImagePages();

            DisplayPage();
        }
        public GuildTerritoryDialog()
        {
            Index   = 680;
            Library = Libraries.CustomPrguse;
            Movable = true;
            Sort    = true;

            #region Buttons.

            var closeButton = new MirButton
            {
                Parent       = this,
                Index        = 361,
                PressedIndex = 363,
                HoverIndex   = 362,
                Library      = Libraries.CustomPrguse,
                Location     = new Point(544, 8),
                Hint         = "Exit"
            };
            closeButton.Click += (o, e) => Hide();

            var prevButton = new MirButton
            {
                HoverIndex   = 241,
                Index        = 240,
                Location     = new Point(214, 213),
                Library      = Libraries.CustomPrguse2,
                Parent       = this,
                PressedIndex = 242,
                Sound        = SoundList.ButtonA,
                Hint         = "Page Back"
            };
            prevButton.Click += (o, e) =>
            {
                if ((Page - 1) >= 0)
                {
                    Page--;
                    Network.Enqueue(new C.GuildTerritoryPage {
                        Page = Page
                    });
                    Reset();
                }
            };

            var nextButton = new MirButton
            {
                HoverIndex   = 244,
                Index        = 243,
                Location     = new Point(317, 213),
                Library      = Libraries.CustomPrguse2,
                Parent       = this,
                PressedIndex = 245,
                Sound        = SoundList.ButtonA,
                Hint         = "Page Forward"
            };
            nextButton.Click += (o, e) =>
            {
                if (((Page + 1) * 7) < Lenght)
                {
                    Page++;
                    Network.Enqueue(new C.GuildTerritoryPage {
                        Page = Page
                    });
                    Reset();
                }
            };


            var mailButton = new MirButton
            {
                Index        = 437,
                HoverIndex   = 438,
                PressedIndex = 439,
                Library      = Libraries.CustomPrguse,
                Location     = new Point(262, 208),
                Sound        = SoundList.ButtonA,
                Parent       = this,
                Hint         = "Mail a Guild Leader"
            };
            mailButton.Click += (o, e) =>
            {
                var GT = GTRowList.FirstOrDefault(x => x.Idx.Text == selectedIndex.ToString());

                if (GT == null || GT.OwnerName.Text == "None")
                {
                    return;
                }

                GameScene.Scene.MailComposeLetterDialog.ComposeMail(GT.OwnerName.Text);
            };

            #endregion

            #region Labels.

            var _titleLabel = new MirImageControl
            {
                Index    = 54,
                Library  = Libraries.CustomTitle,
                Location = new Point(217, 11),
                Parent   = this
            };

            var __gtnumberLabel = new MirLabel
            {
                Location   = new Point(15, 38),
                AutoSize   = true,
                Parent     = this,
                ForeColour = Color.Goldenrod,
                Font       = new Font(Settings.FontName, 8F),
                NotControl = true,
                BackColour = Color.Transparent,
                Text       = "Gt #"
            };

            var __gtguildLabel = new MirLabel
            {
                Location   = new Point(60, 38),
                AutoSize   = true,
                Parent     = this,
                ForeColour = Color.Goldenrod,
                Font       = new Font(Settings.FontName, 8F),
                NotControl = true,
                BackColour = Color.Transparent,
                Text       = "Owning Guild"
            };

            var __gtguildownersLabel = new MirLabel
            {
                Location   = new Point(230, 38),
                AutoSize   = true,
                Parent     = this,
                ForeColour = Color.Goldenrod,
                Font       = new Font(Settings.FontName, 8F),
                NotControl = true,
                BackColour = Color.Transparent,
                Text       = "Guild Leaders"
            };

            var __gtstatusLabel = new MirLabel
            {
                Location   = new Point(380, 38),
                AutoSize   = true,
                Parent     = this,
                ForeColour = Color.Goldenrod,
                Font       = new Font(Settings.FontName, 8F),
                NotControl = true,
                BackColour = Color.Transparent,
                Text       = "Gt Status"
            };

            var __gtpriceLabel = new MirLabel
            {
                Location   = new Point(480, 38),
                AutoSize   = true,
                Parent     = this,
                ForeColour = Color.Goldenrod,
                Font       = new Font(Settings.FontName, 8F),
                NotControl = true,
                BackColour = Color.Transparent,
                Text       = "Gt Price"
            };

            for (int i = 0; i < 7; i++)
            {
                GTRow gt = new GTRow
                {
                    Parent       = this,
                    Location     = new Point(5, 60 + 20 * i),
                    Border       = false,
                    BorderColour = Color.Lime,
                };
                gt.Idx.Text        = (i + 1).ToString();
                gt.GuildOwner.Text = "None";
                gt.OwnerName.Text  = "None";
                gt.Status.Text     = "Available";
                gt.Price.Text      = "10,000,000";

                gt.Click += (e, o) =>
                {
                    var obj = ((GTRow)e);

                    Reset();

                    if (obj.GuildOwner.Text != string.Empty)
                    {
                        int.TryParse(obj.Idx.Text, out selectedIndex);
                        obj.Border = true;
                    }
                };

                GTRowList.Add(gt);
            }

            #endregion
        }
Exemple #29
0
        public RankingDialog()
        {
            Index   = 1329;
            Library = Libraries.Prguse2;
            //Size = new Size(288, 324);
            Movable  = true;
            Sort     = true;
            Location = new Point((800 - Size.Width) / 2, (600 - Size.Height) / 2);

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(362, 3),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            AllButton = new MirButton
            {
                Index        = 751,
                PressedIndex = 752,
                HoverIndex   = 753,
                Library      = Libraries.Title,
                Hint         = "Overall TOP 20",
                Location     = new Point(10, 38),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            AllButton.Click += (o, e) => RequestRanks(0);
            TaoButton        = new MirButton
            {
                Index        = 760,
                PressedIndex = 761,
                HoverIndex   = 762,
                Library      = Libraries.Title,
                Hint         = "TOP 20 Taoists",
                Location     = new Point(40, 38),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            TaoButton.Click += (o, e) => RequestRanks(3);
            WarButton        = new MirButton
            {
                Index        = 754,
                PressedIndex = 755,
                HoverIndex   = 756,
                Library      = Libraries.Title,
                Hint         = "TOP 20 Warriors",
                Location     = new Point(60, 38),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            WarButton.Click += (o, e) => RequestRanks(1);
            WizButton        = new MirButton
            {
                Index        = 763,
                PressedIndex = 764,
                HoverIndex   = 765,
                Library      = Libraries.Title,
                Hint         = "TOP 20 Wizards",
                Location     = new Point(80, 38),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            WizButton.Click += (o, e) => RequestRanks(2);
            SinButton        = new MirButton
            {
                Index        = 757,
                PressedIndex = 758,
                HoverIndex   = 759,
                Library      = Libraries.Title,
                Hint         = "TOP 20 Assasins",
                Location     = new Point(100, 38),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            SinButton.Click += (o, e) => RequestRanks(4);
            ArchButton       = new MirButton
            {
                Index        = 766,
                PressedIndex = 767,
                HoverIndex   = 768,
                Library      = Libraries.Title,
                Hint         = "TOP 20 Archers",
                Location     = new Point(120, 38),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            ArchButton.Click += (o, e) => RequestRanks(5);

            NextButton = new MirButton
            {
                Index        = 207,
                HoverIndex   = 208,
                PressedIndex = 209,
                Library      = Libraries.Prguse2,
                Location     = new Point(361, 386),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            NextButton.Click += (o, e) => Move(1);

            PrevButton = new MirButton
            {
                Index        = 197,
                HoverIndex   = 198,
                PressedIndex = 199,
                Library      = Libraries.Prguse2,
                Location     = new Point(361, 100),
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            PrevButton.Click += (o, e) => Move(-1);

            MyRank = new MirLabel
            {
                Text       = "",
                Parent     = this,
                Font       = new Font(Settings.FontName, 10F, FontStyle.Bold),
                ForeColour = Color.BurlyWood,
                Location   = new Point(229, 36),
                Size       = new Size(82, 22),
                DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                //AutoSize = true
            };
            MyRank.Click += (o, e) => GoToMyRank();


            for (int i = 0; i < Rows.Count(); i++)
            {
                Rows[i] = new RankingRow()
                {
                    Parent   = this,
                    Location = new Point(32, 98 + i * 15),
                    Size     = new Size(315, 15),
                };
            }
            for (int i = 0; i < RankList.Length; i++)
            {
                RankList[i] = new List <Rank_Character_Info>();
            }
        }
Exemple #30
0
        public MountDialog()
        {
            Index       = 167;
            Library     = Libraries.Prguse;
            Movable     = true;
            Sort        = true;
            Location    = new Point(10, 30);
            BeforeDraw += MountDialog_BeforeDraw;

            MountName = new MirLabel
            {
                Location   = new Point(30, 10),
                DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter,
                Parent     = this,
                NotControl = true,
            };
            MountLoyalty = new MirLabel
            {
                Location   = new Point(30, 30),
                DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter,
                Parent     = this,
                NotControl = true,
            };

            MountButton = new MirButton
            {
                Library  = Libraries.Prguse,
                Parent   = this,
                Sound    = SoundList.ButtonA,
                Location = new Point(262, 70)
            };
            MountButton.Click += (o, e) =>
            {
                if (CanRide())
                {
                    Ride();
                }
            };

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            HelpButton = new MirButton
            {
                Index        = 257,
                HoverIndex   = 258,
                PressedIndex = 259,
                Library      = Libraries.Prguse2,
                Parent       = this,
                Sound        = SoundList.ButtonA,
            };
            HelpButton.Click += (o, e) => GameScene.Scene.HelpDialog.DisplayPage("Mounts");

            MountImage = new MirAnimatedControl
            {
                Animated       = false,
                AnimationCount = 16,
                AnimationDelay = 100,
                Index          = 0,
                Library        = Libraries.Prguse,
                Loop           = true,
                Parent         = this,
                NotControl     = true,
                UseOffSet      = true
            };

            Grid = new MirItemCell[Enum.GetNames(typeof(MountSlot)).Length];

            Grid[(int)MountSlot.Reins] = new MirItemCell
            {
                ItemSlot = (int)MountSlot.Reins,
                GridType = MirGridType.Mount,
                Parent   = this,
                Size     = new Size(34, 30)
            };
            Grid[(int)MountSlot.Bells] = new MirItemCell
            {
                ItemSlot = (int)MountSlot.Bells,
                GridType = MirGridType.Mount,
                Parent   = this,
                Size     = new Size(34, 30)
            };

            Grid[(int)MountSlot.Saddle] = new MirItemCell
            {
                ItemSlot = (int)MountSlot.Saddle,
                GridType = MirGridType.Mount,
                Parent   = this,
                Size     = new Size(34, 30)
            };

            Grid[(int)MountSlot.Ribbon] = new MirItemCell
            {
                ItemSlot = (int)MountSlot.Ribbon,
                GridType = MirGridType.Mount,
                Parent   = this,
                Size     = new Size(34, 30)
            };


            Grid[(int)MountSlot.Mask] = new MirItemCell
            {
                ItemSlot = (int)MountSlot.Mask,
                GridType = MirGridType.Mount,
                Parent   = this,
                Size     = new Size(34, 30)
            };
        }