示例#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
        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);
        }
示例#4
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);
        }