Пример #1
0
        public static void Initialize()
        {
            guild_panel              = new EngineObject();
            guild_panel.Texture      = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\guild_panel_2.png", 430, 280);
            guild_panel.Size         = new Size2(430, 280);
            guild_panel.SourceRect   = new Rectangle(0, 0, 430, 280);
            guild_panel.Visible      = true;
            guild_panel.Position     = new Point(300, 200);
            guild_panel.Color        = Color.White;
            guild_panel.Transparency = 255;

            button[0]            = new EngineButton("detail", 128, 32);
            button[0].Position   = new Point(posx + 62, posy + 50);
            button[0].BorderRect = new Rectangle(20, 2, 86, 26);
            button[0].Enabled    = true;
            button[0].Size       = new Size2(128, 32);
            button[0].SourceRect = new Rectangle(0, 0, 128, 32);
            button[0].MouseUp   += Detail_MouseUp;

            button[1]            = new EngineButton("quest", 128, 32);
            button[1].Position   = new Point(posx + 165, posy + 50);
            button[1].BorderRect = new Rectangle(20, 2, 86, 26);
            button[1].Enabled    = true;
            button[1].Size       = new Size2(128, 32);
            button[1].SourceRect = new Rectangle(0, 0, 128, 32);
            button[1].MouseUp   += Quest_MouseUp;

            button[2]            = new EngineButton("member", 128, 32);
            button[2].Position   = new Point(posx + 270, posy + 50);
            button[2].BorderRect = new Rectangle(20, 2, 86, 26);
            button[2].Enabled    = true;
            button[2].Size       = new Size2(128, 32);
            button[2].SourceRect = new Rectangle(0, 0, 128, 32);
            button[2].MouseUp   += Member_MouseUp;

            button[3]            = new EngineButton("invite", 128, 32);
            button[3].Position   = new Point(posx + 165, posy + 210);
            button[3].BorderRect = new Rectangle(20, 2, 86, 26);
            button[3].Enabled    = true;
            button[3].Size       = new Size2(128, 32);
            button[3].SourceRect = new Rectangle(0, 0, 128, 32);
            button[3].MouseUp   += Member_MouseUp;

            button[4]            = new EngineButton("panel", 128, 32);
            button[4].Position   = new Point(posx + 270, posy + 210);
            button[4].BorderRect = new Rectangle(20, 2, 86, 26);
            button[4].Enabled    = true;
            button[4].Size       = new Size2(128, 32);
            button[4].SourceRect = new Rectangle(0, 0, 128, 32);
            button[4].MouseUp   += Member_MouseUp;
        }
Пример #2
0
        public static void Initialize()
        {
            const int X = 285, Y = 600;

            for (var index = 0; index < MAX_SLOT; index++)
            {
                ShortCut[index]            = new EngineShortCut(false);
                ShortCut[index].BorderRect = new SharpDX.Rectangle(0, 0, 40, 40);
                ShortCut[index].SourceRect = new SharpDX.Rectangle(0, 0, 40, 40);
                ShortCut[index].Position   = new SharpDX.Point(X + (index * 36), Y);
            }

            EngineShortCut.StaticTexture = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\slot.png", 40, 40);
        }
Пример #3
0
 private void CheckTexture()
 {
     if (this._texture != this._characterTableau.Texture)
     {
         this._texture = this._characterTableau.Texture;
         if (this._texture != null)
         {
             EngineTexture platformTexture = new EngineTexture(this._texture);
             this._providedTexture = new TaleWorlds.TwoDimension.Texture(platformTexture);
             return;
         }
         this._providedTexture = null;
     }
 }
Пример #4
0
        /// <summary>
        /// Inicia e configura os controles
        /// </summary>
        public static void Initialize()
        {
            BackgroundImage              = new EngineObject();
            BackgroundImage.Position     = new Point(Position.X - 140, Position.Y);
            BackgroundImage.Size         = new Size2(608, 224);
            BackgroundImage.Texture      = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\window_login.png");
            BackgroundImage.SourceRect   = new Rectangle(0, 0, 608, 224);
            BackgroundImage.Transparency = 255;

            TextBox[0]                  = new EngineTextBox("textbox", 256, 32);
            TextBox[0].Size             = new Size2(256, 32);
            TextBox[0].SourceRect       = new Rectangle(0, 0, 256, 32);
            TextBox[0].BorderRect       = new Rectangle(0, 0, 256, 32);
            TextBox[0].Position         = new Point(Position.X + 32, Position.Y + 50);
            TextBox[0].CursorEnabled    = true;
            TextBox[0].Transparency     = 220;
            TextBox[0].TextTransparency = 255;
            TextBox[0].MouseUp         += Textbox_1_MouseUp;
            TextBox[0].TextFormat       = FontDrawFlags.Center;

            TextBox[1]                  = new EngineTextBox("textbox", 256, 32);
            TextBox[1].Size             = new Size2(256, 32);
            TextBox[1].SourceRect       = new Rectangle(0, 0, 256, 32);
            TextBox[1].BorderRect       = new Rectangle(0, 0, 256, 32);
            TextBox[1].Position         = new Point(Position.X + 32, Position.Y + 80);
            TextBox[1].Password         = true;
            TextBox[1].Transparency     = 220;
            TextBox[1].TextTransparency = 255;
            TextBox[1].MouseUp         += Textbox_2_MouseUp;
            TextBox[1].TextFormat       = FontDrawFlags.Center;

            Button[0]            = new EngineButton("login", 128, 32);
            Button[0].Position   = new Point(Position.X + 42, Position.Y + 120);
            Button[0].BorderRect = new Rectangle(20, 2, 86, 26);
            Button[0].SourceRect = new Rectangle(0, 0, 128, 32);
            Button[0].Size       = new Size2(128, 32);
            Button[0].MouseUp   += LoginButton_MouseDown;

            Button[1]            = new EngineButton("end", 128, 32);
            Button[1].Position   = new Point(Position.X + 152, Position.Y + 120);
            Button[1].BorderRect = new Rectangle(20, 2, 86, 26);
            Button[1].SourceRect = new Rectangle(0, 0, 128, 32);
            Button[1].Size       = new Size2(128, 32);
            Button[1].MouseUp   += ExitButton_MouseDown;
        }
Пример #5
0
        /// <summary>
        /// Inicia e configura os controles
        /// </summary>
        public static void Initialize()
        {
            background              = new EngineObject();
            background.Position     = new Point(position.X - 140, position.Y);
            background.Size         = new Size2(608, 224);
            background.Texture      = EngineTexture.TextureFromFile($"{Environment.CurrentDirectory}\\Data\\Graphics\\window_login.png");
            background.SourceRect   = new Rectangle(0, 0, 608, 224);
            background.Transparency = 255;

            textbox[0]                  = new EngineTextBox("textbox", 256, 32);
            textbox[0].Size             = new Size2(256, 32);
            textbox[0].SourceRect       = new Rectangle(0, 0, 256, 32);
            textbox[0].BorderRect       = new Rectangle(0, 0, 256, 32);
            textbox[0].Position         = new Point(position.X + 32, position.Y + 50);
            textbox[0].CursorEnabled    = true;
            textbox[0].Transparency     = 220;
            textbox[0].TextTransparency = 255;
            textbox[0].MouseUp         += Textbox_1_MouseUp;
            textbox[0].TextFormat       = FontDrawFlags.Center;

            textbox[1]                  = new EngineTextBox("textbox", 256, 32);
            textbox[1].Size             = new Size2(256, 32);
            textbox[1].SourceRect       = new Rectangle(0, 0, 256, 32);
            textbox[1].BorderRect       = new Rectangle(0, 0, 256, 32);
            textbox[1].Position         = new Point(position.X + 32, position.Y + 80);
            textbox[1].Password         = true;
            textbox[1].Transparency     = 220;
            textbox[1].TextTransparency = 255;
            textbox[1].MouseUp         += Textbox_2_MouseUp;
            textbox[1].TextFormat       = FontDrawFlags.Center;

            button[0]            = new EngineButton("login", 128, 32);
            button[0].Position   = new Point(position.X + 42, position.Y + 120);
            button[0].BorderRect = new Rectangle(20, 2, 86, 26);
            button[0].SourceRect = new Rectangle(0, 0, 128, 32);
            button[0].Size       = new Size2(128, 32);
            button[0].MouseUp   += LoginButton_MouseDown;

            button[1]            = new EngineButton("end", 128, 32);
            button[1].Position   = new Point(position.X + 152, position.Y + 120);
            button[1].BorderRect = new Rectangle(20, 2, 86, 26);
            button[1].SourceRect = new Rectangle(0, 0, 128, 32);
            button[1].Size       = new Size2(128, 32);
            button[1].MouseUp   += ExitButton_MouseDown;
        }
Пример #6
0
        /// <summary>
        /// Construtor
        /// </summary>
        /// <param name="position"></param>
        public WindowServerRow(Point position)
        {
            background              = new EngineObject();
            background.Enabled      = true;
            background.Transparency = 255;
            background.Size         = new Size2(384, 64);
            background.SourceRect   = new Rectangle(0, 0, 384, 64);
            background.BorderRect   = new Rectangle(14, 8, 360, 35);
            background.Position     = position;
            background.MouseUp     += Background_MouseUp;
            this.Position           = position;

            //carrega a textura apenas uma vez
            if (texture[0] == null)
            {
                texture[0] = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\row1.png", 384, 64);  //350, 35
                texture[1] = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\row2.png", 384, 64);
            }
        }
Пример #7
0
        /// <summary>
        /// Inicializa as configurações.
        /// </summary>
        public static void Initialize()
        {
            Visible = false;

            position                = new Point(412, 200);
            background              = new EngineObject();
            background.Position     = position;
            background.Size         = new Size2(167, 200);
            background.Texture      = EngineTexture.TextureFromFile($".\\Data\\Graphics\\option.png");
            background.SourceRect   = new Rectangle(0, 0, 167, 200);
            background.Transparency = 255;

            button[0]            = new EngineButton("close", 128, 32);
            button[0].Position   = new Point(position.X + 20, position.Y + 35);
            button[0].BorderRect = new Rectangle(7, 2, 112, 26);
            button[0].SourceRect = new Rectangle(0, 0, 128, 32);
            button[0].Size       = new Size2(128, 32);
            button[0].MouseUp   += EndButton_MouseUp;

            button[1]            = new EngineButton("char", 128, 32);
            button[1].Position   = new Point(position.X + 20, position.Y + 70);
            button[1].BorderRect = new Rectangle(7, 2, 112, 26);
            button[1].SourceRect = new Rectangle(0, 0, 128, 32);
            button[1].Size       = new Size2(128, 32);
            button[1].MouseUp   += CharacterButton_MouseUp;

            button[2]            = new EngineButton("option", 128, 32);
            button[2].Position   = new Point(position.X + 20, position.Y + 105);
            button[2].BorderRect = new Rectangle(7, 2, 112, 26);
            button[2].SourceRect = new Rectangle(0, 0, 128, 32);
            button[2].Size       = new Size2(128, 32);
            button[2].MouseUp   += OptionButton_MouseUp;

            button[3]            = new EngineButton("cancel_128", 128, 32);
            button[3].Position   = new Point(position.X + 20, position.Y + 140);
            button[3].BorderRect = new Rectangle(7, 2, 112, 26);
            button[3].SourceRect = new Rectangle(0, 0, 128, 32);
            button[3].Size       = new Size2(128, 32);
            button[3].MouseUp   += CancelButton_MouseUp;
        }
Пример #8
0
        public static void Initialize()
        {
            position = new Point(208, 220);

            SelectedIndex = 1;

            // Configuração imagem de fundo
            backgroundImage            = new EngineObject();
            backgroundImage.Position   = position;
            backgroundImage.Texture    = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\win_char.png", 608, 288);
            backgroundImage.Size       = new Size2(608, 288);
            backgroundImage.SourceRect = new Rectangle(0, 0, 608, 288);

            // Configuração imagem de fundo personagem
            for (int n = 0; n < charBackgroundImage.Length; n++)
            {
                charBackgroundImage[n]            = new EngineObject();
                charBackgroundImage[n].Index      = n;
                charBackgroundImage[n].Enabled    = true;
                charBackgroundImage[n].Texture    = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\selectchar_charback.png", 127, 134);
                charBackgroundImage[n].Size       = new Size2(127, 134);
                charBackgroundImage[n].SourceRect = new Rectangle(0, 0, 127, 134);
                charBackgroundImage[n].MouseUp   += Select_MouseUp;
                charBackgroundImage[n].BorderRect = new Rectangle(0, 0, 127, 134);

                selectedBackground[n]            = new EngineObject();
                selectedBackground[n].Texture    = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\selectchar_selected.png", 127, 134);
                selectedBackground[n].Size       = new Size2(127, 134);
                selectedBackground[n].SourceRect = new Rectangle(0, 0, 127, 134);

                charBackgroundImage[n].Position = new Point((position.X + 49) + (n * 127), position.Y + 70);
                selectedBackground[n].Position  = new Point((position.X + 49) + (n * 127), position.Y + 70);
            }

            //ボタンの設定
            button[0]            = new EngineButton("start", 128, 32);
            button[0].Position   = new Point(position.X + 135, position.Y + 215);
            button[0].BorderRect = new Rectangle(20, 2, 86, 26);
            button[0].Size       = new Size2(128, 32);
            button[0].SourceRect = new Rectangle(0, 0, 128, 32);
            button[0].MouseUp   += Start_MouseUp;

            button[1]            = new EngineButton("create", 128, 32);
            button[1].Position   = new Point(position.X + 242, position.Y + 215);
            button[1].BorderRect = new Rectangle(20, 2, 86, 26);
            button[1].Size       = new Size2(128, 32);
            button[1].SourceRect = new Rectangle(0, 0, 128, 32);
            button[1].MouseUp   += Create_MouseUp;

            button[2]            = new EngineButton("delete", 128, 32);
            button[2].Position   = new Point(position.X + 349, position.Y + 215);
            button[2].BorderRect = new Rectangle(20, 2, 86, 26);
            button[2].Size       = new Size2(128, 32);
            button[2].SourceRect = new Rectangle(0, 0, 128, 32);
            button[2].MouseUp   += Delete_MouseUp;

            button[3]            = new EngineButton("server", 128, 32);
            button[3].Position   = new Point(position.X + 240, position.Y + 30);
            button[3].BorderRect = new Rectangle(20, 2, 86, 26);
            button[3].Size       = new Size2(128, 32);
            button[3].SourceRect = new Rectangle(0, 0, 128, 32);
            button[3].MouseUp   += Server_MouseUp;

            //Configuração personagens
            for (int n = 0; n < 4; n++)
            {
                PlayerData[n]              = new Player();
                PlayerData[n].Name         = "";
                PlayerData[n].Class        = "";
                PlayerData[n].Sprite       = 0;
                PlayerData[n].Level        = 0;
                PlayerData[n].Transparency = 255;
            }

            // Carrega o Wind
            for (int n = 0; n < 23; n++)
            {
                wind[n] = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Wind\" + (n + 1) + ".png", 196, 196);
            }

            // Carrega o Cast
            for (int n = 0; n < 20; n++)
            {
                cast[n] = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Cast_2\" + (n + 1) + ".png", 196, 196);
            }
        }
Пример #9
0
 public static void Initialize()
 {
     texture[0] = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\row1.png", 384, 64);  //350, 35
     texture[1] = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\row2.png", 384, 64);
 }
Пример #10
0
        //##########

        /// <summary>
        ///  Inicializa e define a configuração dos controles.
        /// </summary>
        public static void Initialize()
        {
            Position = new Point(208, 220);

            // Configuração imagem de fundo
            background            = new EngineObject();
            background.Position   = Position;
            background.Texture    = EngineTexture.TextureFromFile($"{Common.Configuration.GamePath}\\Data\\Graphics\\win_char.png", 608, 288);
            background.Size       = new Size2(608, 288);
            background.SourceRect = new Rectangle(0, 0, 608, 288);

            // Configuração imagem de fundo personagem
            for (int n = 0; n < MAX_OBJECT; n++)
            {
                charbackground[n]            = new EngineObject();
                charbackground[n].Index      = n;
                charbackground[n].Enabled    = true;
                charbackground[n].Texture    = EngineTexture.TextureFromFile($"{Common.Configuration.GamePath}\\Data\\Graphics\\selectchar_charback.png", 127, 134);
                charbackground[n].Size       = new Size2(127, 134);
                charbackground[n].SourceRect = new Rectangle(0, 0, 127, 134);
                charbackground[n].MouseUp   += Select_MouseUp;
                charbackground[n].BorderRect = new Rectangle(0, 0, 127, 134);
                charbackground[n].Position   = new Point((Position.X + 49) + (n * 127), Position.Y + 70);


                selected_background[n]            = new EngineObject();
                selected_background[n].Texture    = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Graphics\selectchar_selected.png", 127, 134);
                selected_background[n].Size       = new Size2(127, 134);
                selected_background[n].SourceRect = new Rectangle(0, 0, 127, 134);
                selected_background[n].Position   = new Point((Position.X + 49) + (n * 127), Position.Y + 70);
            }

            //ボタンの設定
            button[0]            = new EngineButton("start", 128, 32);
            button[0].Position   = new Point(Position.X + 135, Position.Y + 215);
            button[0].BorderRect = new Rectangle(20, 2, 86, 26);
            button[0].Size       = new Size2(128, 32);
            button[0].SourceRect = new Rectangle(0, 0, 128, 32);
            button[0].MouseUp   += Start_MouseUp;

            button[1]            = new EngineButton("create", 128, 32);
            button[1].Position   = new Point(Position.X + 242, Position.Y + 215);
            button[1].BorderRect = new Rectangle(20, 2, 86, 26);
            button[1].Size       = new Size2(128, 32);
            button[1].SourceRect = new Rectangle(0, 0, 128, 32);
            button[1].MouseUp   += Create_MouseUp;

            button[2]            = new EngineButton("delete", 128, 32);
            button[2].Position   = new Point(Position.X + 349, Position.Y + 215);
            button[2].BorderRect = new Rectangle(20, 2, 86, 26);
            button[2].Size       = new Size2(128, 32);
            button[2].SourceRect = new Rectangle(0, 0, 128, 32);
            button[2].MouseUp   += Delete_MouseUp;

            button[3]            = new EngineButton("server", 128, 32);
            button[3].Position   = new Point(Position.X + 240, Position.Y + 30);
            button[3].BorderRect = new Rectangle(20, 2, 86, 26);
            button[3].Size       = new Size2(128, 32);
            button[3].SourceRect = new Rectangle(0, 0, 128, 32);
            button[3].MouseUp   += Server_MouseUp;

            //Configuração personagens
            for (int n = 0; n < MAX_OBJECT; n++)
            {
                Player[n]              = new PlayerSlotData();
                Player[n].Name         = string.Empty;
                Player[n].Class        = string.Empty;
                Player[n].Sprite       = 0;
                Player[n].Level        = 0;
                Player[n].Transparency = 255;
            }


            //Carrega as imagens da animação
            for (int n = 0; n < 20; n++)
            {
                cast[n] = EngineTexture.TextureFromFile(Common.Configuration.GamePath + @"\Data\Cast_2\" + (n + 1) + ".png", 196, 196);
            }
        }