Esempio n. 1
0
 private void clearTextBoxes()
 {
     ItemCapacityTextBox.Clear();
     DamageHeadTextBox.Clear();
     BodyDamageTextBox.Clear();
     ProtectionTextBox.Clear();
     ItemTypeTextBox.Clear();
     ItemType2TextBox.Clear();
     RangeTextBox.Clear();
     StructureDamageTextBox.Clear();
     PlayerDamageTextBox.Clear();
     EngineTextBox.Clear();
     ItemHealthTextBox.Clear();
     ShakeTextBox.Clear();
     VolumeTextBox.Clear();
     BarrelDamageTextBox.Clear();
 }
Esempio n. 2
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;
        }
Esempio n. 3
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;
        }
        public static void Initialize()
        {
            Position = new Point(270, 150);

            // Configuração imagem de fundo
            backgroundImage            = new EngineObject(Common.Configuration.GamePath + @"\Data\Graphics\Window_5.png", 450, 340);
            backgroundImage.Position   = Position;
            backgroundImage.Size       = new Size2(450, 340);
            backgroundImage.SourceRect = new Rectangle(0, 0, 450, 340);

            button[0]            = new EngineButton("Previous", 128, 32);
            button[0].Position   = new Point(Position.X + 60, Position.Y + 40);
            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].Index      = 0;
            button[0].MouseUp   += PreviousClass_Click;

            button[1]            = new EngineButton("next", 128, 32);
            button[1].Position   = new Point(Position.X + 290, Position.Y + 40);
            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].Index      = 1;
            button[1].MouseUp   += NextClass_Click;

            button[2]            = new EngineButton("ok", 128, 32);
            button[2].Position   = new Point(Position.X + 110, Position.Y + 280);
            button[2].BorderRect = new Rectangle(20, 2, 86, 26);
            button[2].SourceRect = new Rectangle(0, 0, 128, 32);
            button[2].Size       = new Size2(128, 32);
            button[2].Index      = 2;
            button[2].MouseUp   += OK_Click;

            button[3]            = new EngineButton("back", 128, 32);
            button[3].Position   = new Point(Position.X + 235, Position.Y + 280);
            button[3].BorderRect = new Rectangle(20, 2, 86, 26);
            button[3].SourceRect = new Rectangle(0, 0, 128, 32);
            button[3].Size       = new Size2(128, 32);
            button[3].Index      = 3;
            button[3].MouseUp   += Back_Click;

            textbox               = new EngineTextBox("textbox", 190, 25);
            textbox.Size          = new Size2(190, 25);
            textbox.SourceRect    = new Rectangle(0, 0, 190, 25);
            textbox.Position      = new Point(Position.X + 130, Position.Y + 245);
            textbox.CursorEnabled = true;
            textbox.Enabled       = true;
            textbox.Transparency  = 200;
            textbox.Text          = "";
            //textbox.MouseUp += Textbox_1_MouseUp;
            textbox.TextFormat = FontDrawFlags.Center;

            for (int n = 0; n < 7; n++)
            {
                person[n]              = new EngineObject();
                person[n].Enabled      = true;
                person[n].Size         = new Size2(32, 32);
                person[n].Transparency = 150;
                person[n].SourceRect   = new Rectangle(128, 0, 32, 32);
                person[n].MouseUp     += Person_Click;
            }

            person[3].Transparency = 255;

            person[0].Position   = new Point(Position.X + 70, Position.Y + 190);
            person[0].BorderRect = new Rectangle(0, 0, 32, 32);
            person[0].Index      = 6;

            person[1].Position   = new Point(Position.X + 110, Position.Y + 190);
            person[1].BorderRect = new Rectangle(0, 0, 32, 32);
            person[1].Index      = 7;

            person[2].Position   = new Point(Position.X + 150, Position.Y + 190);
            person[2].BorderRect = new Rectangle(0, 0, 32, 32);
            person[2].Index      = 9;

            person[3].Position   = new Point(Position.X + 210, Position.Y + 190);
            person[3].BorderRect = new Rectangle(0, 0, 32, 32);
            person[3].Index      = 15;

            person[4].Position   = new Point(Position.X + 270, Position.Y + 190);
            person[4].BorderRect = new Rectangle(0, 0, 32, 32);
            person[4].Index      = 10;

            person[5].Position   = new Point(Position.X + 310, Position.Y + 190);
            person[5].BorderRect = new Rectangle(0, 0, 32, 32);
            person[5].Index      = 11;

            person[6].Position   = new Point(Position.X + 350, Position.Y + 190);
            person[6].BorderRect = new Rectangle(0, 0, 32, 32);
            person[6].Index      = 12;

            Classe[0] = "Guerreiro";
            Classe[1] = "Mago";
            Texto[0]  = "Guerreiros, uma classe bastante clássica portando sua espada escudo montado em um belíssimo corcel branco em busca de uma fera ou de uma donzela em perigo.";
            Texto[1]  = "Os Magos têm o poder de utilizar os poderes naturais e elementais como terra, fogo, aguá, ar e os poderes da natureza. Além de poderem causar pequenas Ilusões em seus adversários de menor level.";
        }
Esempio n. 5
0
        /// <summary>
        /// Inicializa e define a configuração dos controles.
        /// </summary>
        public static void Initialize()
        {
            position = new Point(272, 150);

            // Configuração imagem de fundo
            background            = new EngineObject($"{Common.Configuration.GamePath}\\Data\\Graphics\\window_select.png", 480, 384);
            background.Position   = new Point(position.X - 15, position.Y - 15);
            background.Size       = new Size2(480, 384);
            background.SourceRect = new Rectangle(0, 0, 480, 384);

            button[0]            = new EngineButton("previous", 128, 32);
            button[0].Position   = new Point(position.X + 35, position.Y + 40);
            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].Index      = 0;
            button[0].MouseUp   += PreviousClass_Click;

            button[1]            = new EngineButton("next", 128, 32);
            button[1].Position   = new Point(position.X + 290, position.Y + 40);
            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].Index      = 1;
            button[1].MouseUp   += NextClass_Click;

            button[2]            = new EngineButton("ok", 128, 32);
            button[2].Position   = new Point(position.X + 100, position.Y + 280);
            button[2].BorderRect = new Rectangle(20, 2, 86, 26);
            button[2].SourceRect = new Rectangle(0, 0, 128, 32);
            button[2].Size       = new Size2(128, 32);
            button[2].Index      = 2;
            button[2].MouseUp   += Confirm_Click;

            button[3]            = new EngineButton("back", 128, 32);
            button[3].Position   = new Point(position.X + 235, position.Y + 280);
            button[3].BorderRect = new Rectangle(20, 2, 86, 26);
            button[3].SourceRect = new Rectangle(0, 0, 128, 32);
            button[3].Size       = new Size2(128, 32);
            button[3].Index      = 3;
            button[3].MouseUp   += Back_Click;

            textbox               = new EngineTextBox("textbox", 190, 25);
            textbox.Size          = new Size2(190, 25);
            textbox.SourceRect    = new Rectangle(0, 0, 190, 25);
            textbox.Position      = new Point(position.X + 125, position.Y + 245);
            textbox.CursorEnabled = true;
            textbox.Enabled       = true;
            textbox.Transparency  = 200;
            textbox.Text          = string.Empty;
            textbox.TextFormat    = FontDrawFlags.Center;

            for (int n = 0; n < MAX_SPRITE; n++)
            {
                classe[n]              = new EngineObject();
                classe[n].Enabled      = true;
                classe[n].Size         = new Size2(32, 32);
                classe[n].Transparency = 150;
                classe[n].SourceRect   = new Rectangle(128, 0, 32, 32);
                classe[n].MouseUp     += Classe_Click;
            }

            classe[0].Position   = new Point(position.X + 70, position.Y + 190);
            classe[0].BorderRect = new Rectangle(0, 0, 32, 32);
            classe[0].Index      = 0;

            classe[1].Position   = new Point(position.X + 110, position.Y + 190);
            classe[1].BorderRect = new Rectangle(0, 0, 32, 32);
            classe[1].Index      = 1;

            classe[2].Position   = new Point(position.X + 150, position.Y + 190);
            classe[2].BorderRect = new Rectangle(0, 0, 32, 32);
            classe[2].Index      = 2;

            classe[3].Position     = new Point(position.X + 210, position.Y + 190);
            classe[3].BorderRect   = new Rectangle(0, 0, 32, 32);
            classe[3].Transparency = 255;
            classe[3].Index        = 3;

            classe[4].Position   = new Point(position.X + 270, position.Y + 190);
            classe[4].BorderRect = new Rectangle(0, 0, 32, 32);
            classe[4].Index      = 4;

            classe[5].Position   = new Point(position.X + 310, position.Y + 190);
            classe[5].BorderRect = new Rectangle(0, 0, 32, 32);
            classe[5].Index      = 5;

            classe[6].Position   = new Point(position.X + 350, position.Y + 190);
            classe[6].BorderRect = new Rectangle(0, 0, 32, 32);
            classe[6].Index      = 6;

            //Define a sprite da classe selecionada.
            selectedSprite = ClasseManager.Classes[selectedClasse].Sprite[3];
        }