示例#1
0
        public void Biztos_Kilep()
        {
            Panel  panel       = new Panel(new Vector2(400, 150));
            Label  Kilep_Label = new Label("Biztos kiszeretne lépni?", Anchor.TopCenter);
            Button Kilep       = new Button("Igen", ButtonSkin.Default, Anchor.CenterLeft, new Vector2(150, 50));
            Button Nem_Lepki   = new Button("Nem", ButtonSkin.Default, Anchor.CenterRight, new Vector2(150, 50));

            Kilep.SetPosition(Anchor.CenterLeft, new Vector2(10, 20));
            Nem_Lepki.SetPosition(Anchor.CenterRight, new Vector2(10, 20));

            UserInterface.Active.AddEntity(panel);

            panel.AddChild(Kilep_Label);
            panel.AddChild(Kilep);
            panel.AddChild(Nem_Lepki);

            Kilep.OnClick += (Entity entity) =>
            {
                Game1.kilep = true;
            };

            Nem_Lepki.OnClick += (Entity entity) =>
            {
                Menu_Manager.Jatek_Menu_Eltuntet(Menu_Manager.Menu.Biztos_Kilep);
                Menu_Manager.Hasznalhato(true);
            };
            Window_Keszites(panel);
        }
示例#2
0
        public void Window_Jatek_Betoltes()
        {
            Panel  panel      = new Panel(new Vector2(600, 500));
            Header fent_kozep = new Header("Jatek betoltese", Anchor.TopCenter);



            Button Vissza = new Button("Vissza");



            UserInterface.Active.AddEntity(panel);



            panel.AddChild(fent_kozep);



            panel.AddChild(Vissza);

            Vissza.OnClick += (Entity vissza) =>
            {
                Menu_Manager.Jatek_Menu_Eltuntet(Menu_Manager.Menu.Jatek_Betoltes);
            };


            Window_Keszites(panel);
        }
示例#3
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        ///


        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            Kepernyo_Felbontas();
            UserInterface.Initialize(Content, BuiltinThemes.hd);
            IGUI.GUI_Betolt();
            Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Fo_Menu);

            base.Initialize();
        }
示例#4
0
        public void Window_Fo_Menu()
        {
            //öüóűŰúőŐ
            //entitás készítés
            Panel  panel          = new Panel(new Vector2(500, 430));
            Header header         = new Header("Dragon For Honor", Anchor.TopCenter);
            Button Uj_Jatek       = new Button("Uj jatek");
            Button Jatek_Betoltes = new Button("Betoltes");
            Button Beallitasok    = new Button("Beallitasok");
            Button Kilepes        = new Button("Kilepes");

            UserInterface.Active.AddEntity(panel);

            //add entitás
            panel.AddChild(header);
            panel.AddChild(Uj_Jatek);
            panel.AddChild(Jatek_Betoltes);
            panel.AddChild(Beallitasok);
            panel.AddChild(Kilepes);

            //onclick

            Uj_Jatek.OnClick += (Entity entity) =>
            {
                Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Uj_Jatek);
            };

            Uj_Jatek.OnClick += (Entity entity) =>
            {
                Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Uj_Jatek);
            };
            Jatek_Betoltes.OnClick += (Entity entity) =>
            {
                Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Jatek_Betoltes);
            };
            Beallitasok.OnClick += (Entity entity) =>
            {
                Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Beallitasok);
            };

            Kilepes.OnClick += (Entity kilep) =>
            {
                Game1.kilep = true;
            };

            //Window csinálás
            Window_Keszites(panel);
        }
示例#5
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);
            UserInterface.Active.Draw(spriteBatch);
            if (jatek_elinditva == true)
            {
                if (jatek_megallitva == false)
                {
                    tick       = (int)gameTime.TotalGameTime.TotalMilliseconds;
                    eltelt_ido = (tick - frame_ido);
                    frame_ido  = tick;

                    if (walk_timer < tick)
                    {
                        Game_Logic.Process_Movement();
                        walk_timer = tick + 30;
                    }
                    Check_Keys();
                    Game_Logic.Check_Movement();

                    Grafika.Grafika_Renderelese();

                    Menu_Manager.Jatek_Menu_Felhoz(Menu_Manager.Menu.Test);
                    UserInterface.Active.Draw(spriteBatch);
                }
            }
            if (Game_Logic.Menu_Behoz())
            {
                jatek_megallitva = true;
                Menu_Manager.Jatek_Menu_Felhoz(Menu_Manager.Menu.Jatek_Menu);
                UserInterface.Active.Draw(spriteBatch);
                if (Keyboard.GetState().IsKeyDown(Keys.Escape))
                {
                    jatek_megallitva = false;
                    Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Jatek);
                }
            }



            // TODO: Add your drawing code here


            base.Draw(gameTime);
        }
示例#6
0
        public void Window_Uj_Jatek()
        {
            Panel panel = new Panel(new Vector2(600, 500));

            Header      fent_kozep         = new Header("Valassza ki a nehezsegi szintet!", Anchor.TopCenter);
            RadioButton Konnyu             = new RadioButton("Konnyu");
            RadioButton Kozepes            = new RadioButton("Kozepes");
            RadioButton Nehez              = new RadioButton("Nehez");
            CheckBox    targyak_elvesztese = new CheckBox("Targyak elvesztese");
            CheckBox    vegleges_halal     = new CheckBox("Vegleges halal");


            Button Vissza = new Button("Vissza");

            Konnyu.Checked = true;
            Button Jatek_Inditasa = new Button("Jatek inditasa");

            UserInterface.Active.AddEntity(panel);



            panel.AddChild(fent_kozep);
            panel.AddChild(Konnyu);
            panel.AddChild(Kozepes);
            panel.AddChild(Nehez);
            panel.AddChild(targyak_elvesztese);
            panel.AddChild(vegleges_halal);
            panel.AddChild(Jatek_Inditasa);
            panel.AddChild(Vissza);

            Vissza.OnClick += (Entity vissza) =>
            {
                Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Fo_Menu);
            };


            Jatek_Inditasa.OnClick += (Entity entity) =>
            {
                Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Jatek);
                Game1.jatek_elinditva = true;
            };


            Window_Keszites(panel);
        }
示例#7
0
        public void Window_Jatek_Menu()
        {
            Panel  panel            = new Panel(new Vector2(500, 430));
            Header header           = new Header("Dragon For Honor", Anchor.TopCenter);
            Button Vissza_A_Jatekba = new Button("Vissza a jatekba");
            Button Jatek_Betoltes   = new Button("Betoltes");
            Button Beallitasok      = new Button("Beallitasok");
            Button Kilepes          = new Button("Kilepes");



            UserInterface.Active.AddEntity(panel);

            //add entitás
            panel.AddChild(header);
            panel.AddChild(Vissza_A_Jatekba);
            panel.AddChild(Jatek_Betoltes);
            panel.AddChild(Beallitasok);
            panel.AddChild(Kilepes);

            //onclick

            Vissza_A_Jatekba.OnClick += (Entity entity) =>
            {
                Menu_Manager.Jatek_Menu_Eltuntet(Menu_Manager.Menu.Jatek_Menu);
                Game1.jatek_megallitva = false;
            };
            Jatek_Betoltes.OnClick += (Entity entity) =>
            {
                Menu_Manager.Jatek_Menu_Felhoz(Menu_Manager.Menu.Jatek_Betoltes);
            };
            Beallitasok.OnClick += (Entity entity) =>
            {
                Menu_Manager.Jatek_Menu_Felhoz(Menu_Manager.Menu.Jatek_Beallitasok);
            };

            Kilepes.OnClick += (Entity kilep) =>
            {
                Menu_Manager.Jatek_Menu_Felhoz(Menu_Manager.Menu.Biztos_Kilep);
                Menu_Manager.Hasznalhato(false);
            };

            //Window csinálás
            Window_Keszites(panel);
        }
示例#8
0
        public void Window_Jatek_Beallitasok_Grafika()
        {
            Panel  panel          = new Panel(new Vector2(800, 500));
            Button grafika_button = new Button("Grafika");

            //grafika_button.Locked=true;
            grafika_button.Locked = true;


            grafika_button.SetPosition(Anchor.TopLeft, new Vector2(0, -40));
            grafika_button.Size = new Vector2(190, 40);
            //grafika_button.
            grafika_button.FillColor = new Color(150, 150, 150);
            Header fent_kozep      = new Header("Beallitasok", Anchor.TopCenter);
            Label  felbontas_label = new Label("Felbontas:", Anchor.CenterLeft, new Vector2(230, 70), new Vector2(50));

            felbontas_label.SetPosition(Anchor.AutoInline, new Vector2(10, 95));
            felbontas_label.Scale = 1.5f;
            //felbontas_label.Size = new Vector2(40);
            DropDown felbontas = new DropDown(new Vector2(300, 200));

            felbontas.Anchor = Anchor.CenterRight;
            string[] felbontasok = new string[4];
            felbontasok[0] = "800x600";
            felbontasok[1] = "1240x640";
            felbontasok[2] = "1366x720";
            felbontasok[3] = "1920x1080";
            for (int i = 0; i < felbontasok.Length; i++)
            {
                string[] adatok = felbontasok[i].Split('x');
                if (int.Parse(adatok[0]) <= GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width &&
                    int.Parse(adatok[1]) <= GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
                    )
                {
                    felbontas.AddItem(felbontasok[i]);
                }
            }

            felbontas.SelectedIndex = Game1.kijelolt_felbontas;
            CheckBox full_screen_check_box = new CheckBox("Teljes kepernyo");

            full_screen_check_box.Checked = true;
            Button Ment   = new Button("Alkalmaz");
            Button Vissza = new Button("Vissza");

            Game1.felbontas = felbontas.SelectedValue;

            UserInterface.Active.AddEntity(panel);



            panel.AddChild(grafika_button);
            panel.AddChild(fent_kozep);

            panel.AddChild(felbontas_label);

            panel.AddChild(felbontas);
            panel.AddChild(full_screen_check_box);
            panel.AddChild(Ment);
            panel.AddChild(Vissza);


            Ment.OnClick += (Entity entity) => {
                string   sor    = felbontas.SelectedValue;
                string[] adatok = sor.Split('x');
                Game1.x_felbontas = int.Parse(adatok[0]);
                Game1.y_felbontas = int.Parse(adatok[1]);
                Game1.ment        = true;
                Game1.felbontas   = felbontas.SelectedValue;
                if (full_screen_check_box.Checked)
                {
                    Game1.full_screen = true;
                }
                else
                {
                    Game1.full_screen = false;
                }
            };

            Vissza.OnClick += (Entity vissza) =>
            {
                Menu_Manager.Jatek_Menu_Eltuntet(Menu_Manager.Menu.Jatek_Beallitasok);
            };


            Window_Keszites(panel);
        }