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);
        }
        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);
        }
Exemplo n.º 3
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 entry and add it to the list.
            back = new MainMenuEntry(this, "Back");
            MenuEntries.Add(back);
        }
Exemplo n.º 4
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 entry and add it to the list.
            back = new MainMenuEntry(this, "Back");
            MenuEntries.Add(back);
        }
        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 entry and add it to the list.

            spaceLevel = new MainMenuEntry(this, "Space Vortex");
            underwater = new MainMenuEntry(this, "Bubbly Waters");
            lavaLevel  = new MainMenuEntry(this, "Molten Fields");
            back       = new MainMenuEntry(this, "Back");

            MenuEntries.Add(spaceLevel);
            MenuEntries.Add(underwater);
            MenuEntries.Add(lavaLevel);
            MenuEntries.Add(back);
        }
        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 entry and add it to the list.

            spaceLevel = new MainMenuEntry(this, "Space Vortex");
            underwater = new MainMenuEntry(this, "Bubbly Waters");
            lavaLevel = new MainMenuEntry(this, "Molten Fields");
            back = new MainMenuEntry(this, "Back");

            MenuEntries.Add(spaceLevel);
            MenuEntries.Add(underwater);
            MenuEntries.Add(lavaLevel);
            MenuEntries.Add(back);
        }
Exemplo n.º 7
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);
        }