public NewGameMenuScreen()
            : base("Wybór trudności")
        {
            MenuEntry easyMenuEntry;
            MenuEntry mediumMenuEntry;
            MenuEntry hardMenuEntry;
            MenuEntry back = new MenuEntry("Powrót");

            // Generowanie pozycji menu
            easyMenuEntry = new MenuEntry("Łatwy");
            mediumMenuEntry = new MenuEntry("Średni");
            hardMenuEntry = new MenuEntry("Trudny");

            // Eventy
            easyMenuEntry.Selected += EasyMenuEntrySelected;
            mediumMenuEntry.Selected += MediumMenuEntrySelected;
            hardMenuEntry.Selected += HardMenuEntrySelected;
            back.Selected += OnCancel;

            // Dodawanie pozycji do menu
            MenuEntries.Add(easyMenuEntry);
            MenuEntries.Add(mediumMenuEntry);
            MenuEntries.Add(hardMenuEntry);
            MenuEntries.Add(back);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Konstruktor
        /// </summary>
        public MainMenuScreen()
            : base("Menu Główne")
        {
            MenuEntry NewGameMenuEntry = new MenuEntry("Nowa Gra");
            MenuEntry Top5MenuEntry = new MenuEntry("TOP 5");
            MenuEntry OptionsMenuEntry = new MenuEntry("Opcje");
            MenuEntry ExitMenuEntry = new MenuEntry("Wyjście");

            NewGameMenuEntry.Selected += NewGameMenuEntrySelected;
            Top5MenuEntry.Selected += Top5MenuEntrySelected;
            OptionsMenuEntry.Selected += OptionsMenuEntrySelected;
            ExitMenuEntry.Selected += OnCancel;

            MenuEntries.Add(NewGameMenuEntry);
            MenuEntries.Add(Top5MenuEntry);
            MenuEntries.Add(OptionsMenuEntry);
            MenuEntries.Add(ExitMenuEntry);
        }