示例#1
0
        public override void InitializeScreen()
        {
            InputMap.NewAction(PreviousEntryActionName, Keys.Up);
            InputMap.NewAction(NextEntryActionName, Keys.Down);
            InputMap.NewAction(SelectedEntryActionName, Keys.Enter);
            InputMap.NewAction(SelectedEntryActionName, MousePresses.LeftMouse);
            InputMap.NewAction(MenuCancelActionName, Keys.Escape);

            resume = new MainMenuEntry(this, "Resume", "CONTINUE PLAYING THE GAME");
            options = new MainMenuEntry(this, "Options", "CHANGE GAME SETTINGS");
            help = new MainMenuEntry(this, "Help", "INPUT DIAGRAM AND GENERAL GAME INFORMATION");
            quit = new MainMenuEntry(this, "Quit", "DONE PLAYING FOR NOW?");

            Removing += new EventHandler(PauseScreenRemoving);
            Entering += new TransitionEventHandler(PauseScreen_Entering);
            Exiting += new TransitionEventHandler(PauseScreen_Exiting);

            resume.Selected += new EventHandler(ResumeSelect);
            options.Selected += new EventHandler(OptionsSelect);
            help.Selected += new EventHandler(HelpSelect);
            quit.Selected += new EventHandler(QuitSelect);

            MenuEntries.Add(resume);
            MenuEntries.Add(options);
            MenuEntries.Add(help);
            MenuEntries.Add(quit);

            Viewport view = ScreenSystem.Viewport;
            /*
            SetDescriptionArea(new Rectangle(100, view.Height - 100,
                view.Width - 100, 50), new Color(11, 38, 40), new Color(29, 108, 117),
                new Point(10, 0), 0.5f);
            */
        }
示例#2
0
        public override void InitializeScreen()
        {
            InputMap.NewAction(PreviousEntryActionName, Keys.Up);
            InputMap.NewAction(NextEntryActionName, Keys.Down);
            InputMap.NewAction(SelectedEntryActionName, Keys.Enter);
            InputMap.NewAction(MenuCancelActionName, Keys.Escape);

            play = new MainMenuEntry(this, "Again?","GAME OVER - PLAY THE GAME AGAIN?");
            quit = new MainMenuEntry(this, "Quit","DONE PLAYING FOR NOW?");

            Removing += new EventHandler(GameOverRemoving);
            Entering += new TransitionEventHandler(MainMenuScreen_Entering);
            Exiting += new TransitionEventHandler(MainMenuScreen_Exiting);

            play.Selected += new EventHandler(PlaySelect);
            quit.Selected += new EventHandler(QuitSelect);

            MenuEntries.Add(play);
            MenuEntries.Add(quit);

            Viewport view = ScreenSystem.Viewport;
            SetDescriptionArea(new Rectangle(100, view.Height - 100,view.Width - 100, 50),
                                new Color(11, 38, 40),
                                new Color(29, 108, 117),
                                new Point(10, 0), 0.5f);
        }