public override void Initialize()
        {
            //Get a reference to the input system
            InputSystem input = ScreenSystem.InputSystem;

            //Load the actions
            input.NewAction(PreviousEntryActionName, Keys.Up);
            input.NewAction(NextEntryActionName, Keys.Down);
            input.NewAction(SelectedEntryActionName, Keys.Enter);
            input.NewAction(MenuCancelActionName, Keys.Escape);

            //Initialize the entries
            levelSelect = new MainMenuEntry(this, "Play");
            submenu     = new MainMenuEntry(this, "Options");
            intro       = new MainMenuEntry(this, "Intro");
            quit        = new MainMenuEntry(this, "Quit Game");

            //Set up the screen events
            Removing += new EventHandler(MainMenuRemoving);
            Entering += new TransitionEventHandler(MainMenuScreen_Entering);
            Exiting  += new TransitionEventHandler(MainMenuScreen_Exiting);

            //Set up the entry events, and load a submenu.
            levelSelect.AddSubMenu(new LevelSelectScreen(this));
            submenu.AddSubMenu(new OptionsScreen(this));
            intro.Selected += new EventHandler(IntroSelect);
            quit.Selected  += new EventHandler(QuitSelect);

            //Finally, add all entries to the list
            MenuEntries.Add(levelSelect);
            MenuEntries.Add(submenu);
            MenuEntries.Add(intro);
            MenuEntries.Add(quit);
        }
Beispiel #2
0
        public override void Initialize()
        {
            //Fade the screen below
            EnableFade(Color.Black, 0.8f);

            //Keys are already mapped from Menu Screen so we do not need to map
            //them again

            //Initialize the entries and set up the events
            submenu = new MainMenuEntry(this, "Select Level");
            submenu.AddSubMenu(new LevelSelectScreen(this));
            mainmenu           = new MainMenuEntry(this, "Quit to Main Menu");
            mainmenu.Selected += new EventHandler(MainMenuSelect);
            quit           = new MainMenuEntry(this, "Quit Game");
            quit.Selected += new EventHandler(QuitSelect);

            //Finally, add all entries to the list
            //MenuEntries.Add(resume);
            MenuEntries.Add(submenu);
            MenuEntries.Add(mainmenu);
            MenuEntries.Add(quit);
        }
        public override void Initialize()
        {
            //Fade the screen below
            EnableFade(Color.Black, 0.8f);

            //Keys are already mapped from Menu Screen so we do not need to map
            //them again

            //Initialize the entries and set up the events
            submenu = new MainMenuEntry(this, "Select Level");
            submenu.AddSubMenu(new LevelSelectScreen(this));
            mainmenu = new MainMenuEntry(this, "Quit to Main Menu");
            mainmenu.Selected += new EventHandler(MainMenuSelect);
            quit = new MainMenuEntry(this, "Quit Game");
            quit.Selected += new EventHandler(QuitSelect);

            //Finally, add all entries to the list
            //MenuEntries.Add(resume);
            MenuEntries.Add(submenu);
            MenuEntries.Add(mainmenu);
            MenuEntries.Add(quit);
        }
        public override void Initialize()
        {
            //Get a reference to the input system
            InputSystem input = ScreenSystem.InputSystem;

            //Load the actions
            input.NewAction(PreviousEntryActionName, Keys.Up);
            input.NewAction(NextEntryActionName, Keys.Down);
            input.NewAction(SelectedEntryActionName, Keys.Enter);
            input.NewAction(MenuCancelActionName, Keys.Escape);

            //Initialize the entries
            levelSelect = new MainMenuEntry(this, "Play");
            submenu = new MainMenuEntry(this, "Options");
            intro = new MainMenuEntry(this, "Intro");
            quit = new MainMenuEntry(this, "Quit Game");

            //Set up the screen events
            Removing += new EventHandler(MainMenuRemoving);
            Entering += new TransitionEventHandler(MainMenuScreen_Entering);
            Exiting += new TransitionEventHandler(MainMenuScreen_Exiting);

            //Set up the entry events, and load a submenu.
            levelSelect.AddSubMenu(new LevelSelectScreen(this));
            submenu.AddSubMenu(new OptionsScreen(this));
            intro.Selected += new EventHandler(IntroSelect);
            quit.Selected += new EventHandler(QuitSelect);

            //Finally, add all entries to the list
            MenuEntries.Add(levelSelect);
            MenuEntries.Add(submenu);
            MenuEntries.Add(intro);
            MenuEntries.Add(quit);
        }